You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the class OrganisationEntity implements the Node interface and the classes Company, Branch and Store are direct subclasses. When an entity is retrieved from the DB it is an instance of the appropriate class. Now when a branch has several stores as descendents and I want to delete the branch, it will NOT delete the stores. The reason is that delete() (and several other calls) pass the class: get_class($this->getNode()) to the querybuilder. Therefore, deleting a Branch will not delete the stores, because these are different classes.
I have made the same changes that were done to shiftRLRange in commit c84f0d9 (Little fix to make it works with Inheritance) to several other calls (delete, moveBetweenTrees, etc):
I have the following metadata for the class that implements the Node interface:
So the class OrganisationEntity implements the Node interface and the classes Company, Branch and Store are direct subclasses. When an entity is retrieved from the DB it is an instance of the appropriate class. Now when a branch has several stores as descendents and I want to delete the branch, it will NOT delete the stores. The reason is that delete() (and several other calls) pass the class: get_class($this->getNode()) to the querybuilder. Therefore, deleting a Branch will not delete the stores, because these are different classes.
I have made the same changes that were done to shiftRLRange in commit c84f0d9 (Little fix to make it works with Inheritance) to several other calls (delete, moveBetweenTrees, etc):
Added line:
Replaced:
with
$metadata->rootEntityName
So far it seems to work for delete. Haven't tested the other methods.
The text was updated successfully, but these errors were encountered: