Bug #16674
closedtcemain: Hook processDatamap_afterDatabaseOperations and insert operations
0%
Description
When using the hook processDatamap_afterDatabaseOperations to execute your own code after the databse operation, not the new insert_id ist given to the hook, but the temporarily ID NEW......
Sinve insertDB already returns the new insert _id, the new ID should be stored in $id, to have it availiabe in the hook.
(issue imported from #M4446)
Files
Updated by Jens Mittag almost 18 years ago
I would really like to see this problem solved in the next minor/major release. An extension of mine (jm_gallery) makes use of this "feature" to provide a better usability to the user...
Updated by Michael Stucki almost 18 years ago
Ingmar, can I close this bug? Seems like you and Ingo found a different solution, didn't you?
Updated by Ingo Schmitt almost 18 years ago
Could be closed, since Ingmar wanted to update teh documentation:
See bugs newsgroup:
You can easily translate from the NEW... id to the real id by using the
$tce->substNEWwithIDs array.
Updated by Ingo Schmitt almost 18 years ago
Could be closed, since Ingmar wanted to update teh documentation:
See bugs newsgroup:
You can easily translate from the NEW... id to the real id by using the
$tce->substNEWwithIDs array.
Updated by Ingmar Schlecht almost 18 years ago
Fixed by NOT changing the behavior but adding this comment to the code:
/*
* Note: When using the hook after INSERT operations, you will only get the temporary NEW... id passed to your hook as $id,
* but you can easily translate it to the real uid of the inserted record using the $this->substNEWwithIDs array.
*/