File tree Expand file tree Collapse file tree
cayenne/src/main/java/org/apache/cayenne/access/flush/operation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ CAY-2876 Memory leak in the ObjectStore
2727CAY-2879 Negative number for non parameterized ObjectSelect query not processed correctly
2828CAY-2883 License and notice templates are not processed by the Gradle build
2929CAY-2885 Modeler: DbImport fails to load DB schema view
30+ CAY-2896 Inserting two identical objects into two datamaps stores both objects in the last used datamap
3031
3132----------------------------------
3233Release: 5.0-M1
Original file line number Diff line number Diff line change @@ -77,15 +77,13 @@ public String toString() {
7777 return entity .getName () + " " + changeId ;
7878 }
7979
80+ /**
81+ * Internal check used in the batching ops logic
82+ * @param rowOp to compare with
83+ * @return true if another op has the same entity name and datamap
84+ */
8085 protected boolean entitiesHaveSameNameAndDataMap (DbRowOp rowOp ) {
81- return entitiesHaveSameName (rowOp ) && entitiesHaveSameDataMap (rowOp );
82- }
83-
84- boolean entitiesHaveSameName (DbRowOp rowOp ) {
85- return rowOp .getEntity ().getName ().equals (getEntity ().getName ());
86- }
87-
88- private boolean entitiesHaveSameDataMap (DbRowOp rowOp ) {
89- return rowOp .getEntity ().getDataMap ().getName ().equals (getEntity ().getDataMap ().getName ());
86+ return getEntity ().getName ().equals (rowOp .getEntity ().getName ())
87+ && getEntity ().getDataMap ().getName ().equals (rowOp .getEntity ().getDataMap ().getName ());
9088 }
9189}
You can’t perform that action at this time.
0 commit comments