Description
Given the model:
// a table with a many to many to self T1: id, type T11: child_id, parent_id; // Base ObjEntity O1: - flat rel "parents" mapped as "db:parents.parent" // Sub ObjEntity 1 O1S1: - flat rel "children" mapped as "db:children.child" // Sub ObjEntity 2 O1S2:
O1S1 parent = ... O1S2 child = ... // THE PROBLEM IS HERE // This fails to set "parents" relationship of O1S2 parent.addToChildren(child);
The culprit seems to be "ObjRelationship.getReverseRelationship()", specifically this check here
for (ObjRelationship relationship : target.getRelationships()) { // TODO: this should be replaced with inheritance-aware code. // "relationship.getTargetEntity()" should be allowed to be a // super entity of source if (relationship.getTargetEntity() != source) { continue; }
Attachments
Issue Links
- causes
-
CAY-2801 Incorrect equals() implementation in IdGenerationMarker could cause data missing in the commit
- Closed