Taxonnode parent merge cascade leads to non-transactional behavior
If a taxon node is changed and saved the update result also contains its parent and also grandparents up to the classification. This can be seen in the session view of the TaxEditor When saving again all these objects are also merged.
This is not only a performance issue for deeper classifications but it also leads to a situation that if the parent was edited and saved in the meanwhile this editing gets lost because the parent state of the child is saved afterwards.
This behavior can be reproduced by:
- Open parent and child
- Change child (e.g. publish flag) and save
- Change parent (e.g. publish flag) and save
- Change child again and save
Reopen parent => it has the state from before the change
This is critical.
NOTE: Before closing: think about removing SaveOrUpdateEntityListener. It is currently not used anymore.
ref #9520 fix TaxonNodeNaturalComparator for nodes without treeindex (should not really happen)
ref #9520 fix ClassificationServiceImpl und TaxonServiceImplTest for non-cascading parent node
ref #9520 move treeIndex update to CdmPreDataChangeListener as SaveOrUpdateEntityListener is not always fired
(only when object is explicitly saved or updated)
ref #9520 fix TaxonNodeServiceImplTest after treeIndex is now correctly triggered
#1 Updated by Andreas Müller about 1 month ago
- Status changed from New to Resolved
- Assignee changed from Andreas Müller to Katja Luther
- Priority changed from New to Highest
- % Done changed from 0 to 50
This needs intensive reviewing as I removed cascading taxon node to parent.
I tested already that the problem itself is solved. I tested the steps from the description and now the new state remains after the child was saved.