Closed fruit closed 13 years ago
when using Cachetagable and NestedSet (from Doctrine) on the same Model, the NestedSet functions like moveAsNextSiblingOf do not work right. Using these function will not update the "level" column anymore...
I digged in the code and found the part which is causing the problem... In lib/vender/Doctrine/Template/Listener/Cachetaggable.php public function preDqlUpdate (Doctrine_Event $event) I had to change:
foreach ($selectQuery->execute() as $object) { $tags[$object->obtainTagName()] = $updateVersion; }
to
foreach ($selectQuery->fetchArray() as $object) { $tags[$table->getClassnameToReturn() . ':' . $object['id']] = $updateVersion; }this prevents fetching objects from the DB with old values causing the conflict.
@mcnilz, could you check d2fcd030370b2edba632d34b82f2f34dde755727 (v4.1.0) fixes your problem or not.
./symfony plugin:upgrade sfCacheTaggingPlugin
works :) good work.
Check for bugs, problems, errors when model has
NestedSet
behavior with plugin's behaviorCachetaggable
.