-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#183 Remove references to and noisly deprecated CRM_Core_DAO::createTempTableName #15793
dev/core#183 Remove references to and noisly deprecated CRM_Core_DAO::createTempTableName #15793
Conversation
(Standard links)
|
9d62b52
to
5013476
Compare
CRM/Contact/BAO/Query.php
Outdated
@@ -4200,7 +4200,10 @@ public function relationship(&$values) { | |||
$relationshipTempTable = NULL; | |||
if (self::$_relType == 'reciprocal') { | |||
$where = []; | |||
self::$_relationshipTempTable = $relationshipTempTable = CRM_Core_DAO::createTempTableName('civicrm_rel'); | |||
self::$_relationshipTempTable = $relationshipTempTable = CRM_Utils_SQL_TempTable::build() | |||
->setCategory('civicrm_rel') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BG: createTempTableName($prefix)
and tempTable->category
are not interchangeable. The former yields a table name like civicrm_rel_temp_1234
while the latter would look like civicrm_tmp_e_civicrm_rel_1234
. The category
has tighter validation.
Comment: When I manually run TempTable::build()
like this in cv
, it throws an exception b/c the category has _
. Assuming that this change is safe (e.g. there's no other code that relies on the /^civicrm_rel_/
prefix), then you could just do rel
or drop the category completely.
Test failures relate here
|
5013476
to
fe6bf8b
Compare
@seamuslee001 just to build on @totten's note about the categories - it's more helpful when a category is NOT used -because then any tables like civicrm_tmp* can be excluded from replication. We miss that main benefit when using a category - although there are likely cases where it makes sense to do I'm not sure what they are. In general no category is better than category |
@eileenmcnaughton category should not stop that because the category is added as the 3rd param so the table name would be |
fe6bf8b
to
7a1734a
Compare
ok @eileenmcnaughton @totten removed the category and also neatened up some of the test changes, i think this is good now, The test failures have demonstrated we do have unit test coverage of the relationship change |
7a1734a
to
000b20f
Compare
…bleName Update unit test to match new temp table format
000b20f
to
5b50824
Compare
Code seems logical & if this didn't work I would expect that relationship search would fatal - which it didn't.... |
Reciprocal relationship search with custom fields leads to an error on Advanced search after this change. Have raised a PR for the fix at #17132 |
Overview
This removes the last references to
CRM_Core_DAO::createTempTableName
and also adds in some noisy deprecationBefore
Deprecated function used and not noisley deprecated
After
Deprecated function not used and noisely deprecated
This includes #15792
ping @eileenmcnaughton @totten @monishdeb