File tree Expand file tree Collapse file tree
cayenne-server/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 @@ -20,6 +20,7 @@ Bug Fixes:
2020
2121CAY-2883 License and notice templates are not processed by the Gradle build
2222CAY-2885 Modeler: DbImport fails to load DB schema view
23+ CAY-2896 Inserting two identical objects into two datamaps stores both objects in the last used datamap
2324
2425----------------------------------
2526Release: 4.2.2
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