cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abulat...@apache.org
Subject [cayenne] branch STABLE-4.0 updated: CAY-2550 Modeler: ObjAttribute inspector modifies wrong columns in attribute table
Date Thu, 07 Mar 2019 13:00:08 GMT
This is an automated email from the ASF dual-hosted git repository.

abulatski pushed a commit to branch STABLE-4.0
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/STABLE-4.0 by this push:
     new d106df0  CAY-2550 Modeler: ObjAttribute inspector modifies wrong columns in attribute
table
d106df0 is described below

commit d106df0753d86de9edf1f73b346baec6a9ef1fb9
Author: Arseni Bulatski <ancarseni@gmail.com>
AuthorDate: Thu Mar 7 15:57:57 2019 +0300

    CAY-2550 Modeler: ObjAttribute inspector modifies wrong columns in attribute table
---
 RELEASE-NOTES.txt                                  |  9 ++++++++
 .../dialog/objentity/ObjAttributeInfoDialog.java   | 24 +++++++++++-----------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index a27c383..02a2cd0 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -8,6 +8,15 @@ To browse individual bug reports check out project issue tracker:
 https://issues.apache.org/jira/browse/CAY
 
 ----------------------------------
+Release: 4.0.2
+Date:
+----------------------------------
+
+Bug Fixes:
+
+CAY-2550 Modeler: ObjAttribute inspector modifies wrong columns in attribute table
+
+----------------------------------
 Release: 4.0.1
 Date: December 20, 2018
 ----------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
index a0d0a39..7f8c258 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjAttributeInfoDialog.java
@@ -401,7 +401,7 @@ public class ObjAttributeInfoDialog extends CayenneController implements
TreeSel
 					attributeSaved.setDbAttributePath(attributePath.toString());
 
 					if (!attribute.getDbAttributePath().equals(attributePath.toString()) && isChange)
{
-						model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+						model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 					}
 					return true;
 				}
@@ -411,7 +411,7 @@ public class ObjAttributeInfoDialog extends CayenneController implements
TreeSel
 
 					attributeSaved.setDbAttributePath(attributePath.toString());
 					if (attributePath.length() == 0) {
-						model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+						model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 						return false;
 					}
 					return true;
@@ -442,14 +442,14 @@ public class ObjAttributeInfoDialog extends CayenneController implements
TreeSel
 				if (attribute instanceof EmbeddedAttribute) {
 					changeAttributeObject();
 				} else {
-					model.setUpdatedValueAt(attributeSaved.getName(), row, 1);
-					model.setUpdatedValueAt(attributeSaved.getType(), row, 2);
+					model.setUpdatedValueAt(attributeSaved.getName(), row, 0);
+					model.setUpdatedValueAt(attributeSaved.getType(), row, 1);
 				}
 
-				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 			} else {
-				model.setUpdatedValueAt(attributeSaved.getName(), row, 1);
-				model.setUpdatedValueAt(attributeSaved.getType(), row, 2);
+				model.setUpdatedValueAt(attributeSaved.getName(), row, 0);
+				model.setUpdatedValueAt(attributeSaved.getType(), row, 1);
 			}
 		} else {
 
@@ -466,14 +466,14 @@ public class ObjAttributeInfoDialog extends CayenneController implements
TreeSel
 					compareAndSetOverrideInEmbeddedAttribute(attributeSaved, overrides, currentOverrAttr);
 				}
 
-				model.setUpdatedValueAt(attributeSaved.getName(), row, 1);
-				model.setUpdatedValueAt(attributeSaved.getType(), row, 2);
-				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+				model.setUpdatedValueAt(attributeSaved.getName(), row, 0);
+				model.setUpdatedValueAt(attributeSaved.getType(), row, 1);
+				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 			}
 
 			if (attributeSaved instanceof EmbeddedAttribute && attribute instanceof EmbeddedAttribute)
{
 
-				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+				model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 				if (embeddableModel.isAttributeOverrideChange()) {
 					Map<String, String> overrides;
 					overrides = ((EmbeddedAttribute) attribute).getAttributeOverrides();
@@ -495,7 +495,7 @@ public class ObjAttributeInfoDialog extends CayenneController implements
TreeSel
 		}
 		if (attributeSaved instanceof EmbeddedAttribute) {
 			attributeSaved.setDbAttributePath(null);
-			model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 3);
+			model.setUpdatedValueAt(attributeSaved.getDbAttributePath(), row, 2);
 		}
 
 		model.getEntity().removeAttribute(attribute.getName());


Mime
View raw message