You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2006/05/30 21:09:57 UTC
svn commit: r410348 - in
/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map:
DbRelationship.java ObjRelationship.java
Author: aadamchik
Date: Tue May 30 12:09:57 2006
New Revision: 410348
URL: http://svn.apache.org/viewvc?rev=410348&view=rev
Log:
CAY-326 - correctly refreshing object relationships when DB relationships parameters change
Modified:
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/DbRelationship.java
incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/ObjRelationship.java
Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/DbRelationship.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/DbRelationship.java?rev=410348&r1=410347&r2=410348&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/DbRelationship.java (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/DbRelationship.java Tue May 30 12:09:57 2006
@@ -296,8 +296,11 @@
return toDependentPK;
}
- public void setToDependentPK(boolean flag) {
- toDependentPK = flag;
+ public void setToDependentPK(boolean toDependentPK) {
+ if (this.toDependentPK != toDependentPK) {
+ this.toDependentPK = toDependentPK;
+ firePropertyDidChange();
+ }
}
/**
@@ -484,8 +487,10 @@
* Sets relationship multiplicity.
*/
public void setToMany(boolean toMany) {
- this.toMany = toMany;
- this.firePropertyDidChange();
+ if (this.toMany != toMany) {
+ this.toMany = toMany;
+ this.firePropertyDidChange();
+ }
}
protected void firePropertyDidChange() {
Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/ObjRelationship.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/ObjRelationship.java?rev=410348&r1=410347&r2=410348&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/ObjRelationship.java (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/map/ObjRelationship.java Tue May 30 12:09:57 2006
@@ -370,7 +370,8 @@
}
public void dbRelationshipDidChange(RelationshipEvent event) {
- this.calculateToManyValue();
+ calculateToManyValue();
+ calculateReadOnlyValue();
}
/**