Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2009-08-25 15:51:59 +0000
committerkmoore2009-08-25 15:51:59 +0000
commitb8f13671765ef278abaa18dd8ee3b8fb0f0ca9f1 (patch)
tree2b9e15f2222e6a219c239f376752251106440bf3
parentc0214803c7703698181cdadffd0901196ce1191c (diff)
downloadwebtools.dali-b8f13671765ef278abaa18dd8ee3b8fb0f0ca9f1.tar.gz
webtools.dali-b8f13671765ef278abaa18dd8ee3b8fb0f0ca9f1.tar.xz
webtools.dali-b8f13671765ef278abaa18dd8ee3b8fb0f0ca9f1.zip
null check on relationship mapping since it can be null when in the context of an association override
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
index 9d7d02e1d5..146454083c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
@@ -50,7 +50,11 @@ public class MappingTools {
if (owningTableName == null) {
return null;
}
- Entity targetEntity = relationshipReference.getRelationshipMapping().getResolvedTargetEntity();
+ RelationshipMapping relationshipMapping = relationshipReference.getRelationshipMapping();
+ if (relationshipMapping == null) {
+ return null;
+ }
+ Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
if (targetEntity == null) {
return null;
}

Back to the top