Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2009-03-12 15:49:07 +0000
committerpfullbright2009-03-12 15:49:07 +0000
commita077dc170bc4461e101147cdbe8103633072b16e (patch)
tree24bf6ab26cf2da321f9d7ca160f7f547c0d6b526 /jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java
parenta9f47c5adffe136b7e0cfd7a76dba0ae6fc6b2c4 (diff)
downloadwebtools.dali-a077dc170bc4461e101147cdbe8103633072b16e.tar.gz
webtools.dali-a077dc170bc4461e101147cdbe8103633072b16e.tar.xz
webtools.dali-a077dc170bc4461e101147cdbe8103633072b16e.zip
handle when target entity does not resolve
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToManyRelationshipReference.java5
1 files changed, 4 insertions, 1 deletions
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 197a600d74..f53d47dce9 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
@@ -57,8 +57,11 @@ public class GenericJavaOneToManyRelationshipReference
public boolean isOwnedBy(RelationshipMapping mapping) {
// true if the target entity matches the mapping's entity
// and this mappedByJoiningStrategy value matches the mapping's name
+ String targetEntity =
+ (getRelationshipMapping().getResolvedTargetEntity() == null) ?
+ null : getRelationshipMapping().getResolvedTargetEntity().getName();
return StringTools.stringsAreEqual(
- this.getRelationshipMapping().getResolvedTargetEntity().getName(),
+ targetEntity,
mapping.getEntity().getName())
&& StringTools.stringsAreEqual(
this.getMappedByJoiningStrategy().getMappedByAttribute(),

Back to the top