Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2009-03-19 20:32:35 +0000
committerpfullbright2009-03-19 20:32:35 +0000
commitc0b5e40d189c80f750a6be6cb5e11933bdec61b0 (patch)
treed294b5c7d2d35f32516930711e2141b515e3bf11
parentda09211d0bcbbaa3cb6e0683b0dedad37427c3d1 (diff)
downloadwebtools.dali-c0b5e40d189c80f750a6be6cb5e11933bdec61b0.tar.gz
webtools.dali-c0b5e40d189c80f750a6be6cb5e11933bdec61b0.tar.xz
webtools.dali-c0b5e40d189c80f750a6be6cb5e11933bdec61b0.zip
expanded on Karen's fix for strategy add/remove ordering
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToManyRelationshipReference.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaOneToManyRelationshipReference.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyRelationshipReference.java1
9 files changed, 10 insertions, 18 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java
index 85931f3e82..7bd6c82a21 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java
@@ -98,8 +98,8 @@ public class GenericJavaManyToManyRelationshipReference
}
public void setMappedByJoiningStrategy() {
- this.joinTableJoiningStrategy.removeStrategy();
this.mappedByJoiningStrategy.addStrategy();
+ this.joinTableJoiningStrategy.removeStrategy();
}
public void unsetMappedByJoiningStrategy() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java
index 56f4e84d94..1b042b25ab 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java
@@ -74,7 +74,8 @@ public class GenericJavaManyToOneRelationshipReference
}
public void setJoinColumnJoiningStrategy() {
- this.joinColumnJoiningStrategy.addStrategy();
+ // join columns are default (and only, so far) strategy, so no need
+ // to add to resource model
}
public void unsetJoinColumnJoiningStrategy() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java
index 083c0a8e9d..7b862c090b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java
@@ -98,7 +98,6 @@ public class GenericJavaOneToManyRelationshipReference
}
public void setMappedByJoiningStrategy() {
- //add the mappedByJoinStrategy first to avoid the update changing the joinTable strategy out from under us
this.mappedByJoiningStrategy.addStrategy();
this.joinTableJoiningStrategy.removeStrategy();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java
index ff98587b8a..45b75bbd2e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java
@@ -108,9 +108,9 @@ public class GenericJavaOneToOneRelationshipReference
}
public void setMappedByJoiningStrategy() {
+ this.mappedByJoiningStrategy.addStrategy();
this.joinColumnJoiningStrategy.removeStrategy();
this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
- this.mappedByJoiningStrategy.addStrategy();
}
public void unsetMappedByJoiningStrategy() {
@@ -159,9 +159,9 @@ public class GenericJavaOneToOneRelationshipReference
}
public void setPrimaryKeyJoinColumnJoiningStrategy() {
+ this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
this.mappedByJoiningStrategy.removeStrategy();
this.joinColumnJoiningStrategy.removeStrategy();
- this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
}
public void unsetPrimaryKeyJoinColumnJoiningStrategy() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java
index 02b0a7f276..f5e9cc6b11 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java
@@ -128,8 +128,8 @@ public class GenericOrmManyToManyRelationshipReference
}
public void setMappedByJoiningStrategy() {
- this.joinTableJoiningStrategy.removeStrategy();
this.mappedByJoiningStrategy.addStrategy();
+ this.joinTableJoiningStrategy.removeStrategy();
}
public void unsetMappedByJoiningStrategy() {
@@ -184,8 +184,6 @@ public class GenericOrmManyToManyRelationshipReference
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
this.mappedByJoiningStrategy.validate(messages, reporter);
- //commenting out for now as a result of 268409 and us wanting to
- //lessen the risk of invalid validation errors in 2.2M6
-// this.joinTableJoiningStrategy.validate(messages, reporter);
+ this.joinTableJoiningStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToManyRelationshipReference.java
index 8dce529b71..b0c74f4b5a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToManyRelationshipReference.java
@@ -122,7 +122,6 @@ public class GenericOrmOneToManyRelationshipReference
}
public void setMappedByJoiningStrategy() {
- //add the mappedByJoinStrategy first to avoid the update changing the model out from under us
this.mappedByJoiningStrategy.addStrategy();
this.joinTableJoiningStrategy.removeStrategy();
}
@@ -151,7 +150,6 @@ public class GenericOrmOneToManyRelationshipReference
}
public void setJoinTableJoiningStrategy() {
- //add the joinTableJoiningStrategy first to avoid the update changing the model out from under us
this.joinTableJoiningStrategy.addStrategy();
this.mappedByJoiningStrategy.removeStrategy();
}
@@ -184,8 +182,6 @@ public class GenericOrmOneToManyRelationshipReference
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
this.mappedByJoiningStrategy.validate(messages, reporter);
- //commenting out for now as a result of 268409 and us wanting to
- //lessen the risk of invalid validation errors in 2.2M6
- //this.joinTableJoiningStrategy.validate(messages, reporter);
+ this.joinTableJoiningStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java
index 069c200f42..d460a4a687 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java
@@ -144,9 +144,9 @@ public class GenericOrmOneToOneRelationshipReference
}
public void setMappedByJoiningStrategy() {
+ this.mappedByJoiningStrategy.addStrategy();
this.joinColumnJoiningStrategy.removeStrategy();
this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
- this.mappedByJoiningStrategy.addStrategy();
}
public void unsetMappedByJoiningStrategy() {
@@ -195,9 +195,9 @@ public class GenericOrmOneToOneRelationshipReference
}
public void setPrimaryKeyJoinColumnJoiningStrategy() {
+ this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
this.mappedByJoiningStrategy.removeStrategy();
this.joinColumnJoiningStrategy.removeStrategy();
- this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
}
public void unsetPrimaryKeyJoinColumnJoiningStrategy() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaOneToManyRelationshipReference.java
index 2abd71d082..6cd84dc610 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaOneToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/java/EclipseLinkJavaOneToManyRelationshipReference.java
@@ -109,7 +109,6 @@ public class EclipseLinkJavaOneToManyRelationshipReference
}
public void setJoinColumnJoiningStrategy() {
- //add the join-column strategy to prevent the update from changing the model out from under us
this.joinColumnJoiningStrategy.addStrategy();
this.mappedByJoiningStrategy.removeStrategy();
this.joinTableJoiningStrategy.removeStrategy();
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyRelationshipReference.java
index a33c343e02..7be7652aef 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyRelationshipReference.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/orm/EclipseLinkOrmOneToManyRelationshipReference.java
@@ -132,7 +132,6 @@ public class EclipseLinkOrmOneToManyRelationshipReference
}
public void setJoinColumnJoiningStrategy() {
- //add the join-column strategy to prevent the update from changing the model out from under us
this.joinColumnJoiningStrategy.addStrategy();
this.mappedByJoiningStrategy.removeStrategy();
this.joinTableJoiningStrategy.removeStrategy();

Back to the top