231539 - "Null" table and join column messages
diff --git a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
index f7ad362..1b8bb73 100644
--- a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
+++ b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
@@ -52,7 +52,7 @@
 JOIN_TABLE_UNRESOLVED_SCHEMA=Schema \"{0}\" cannot be resolved for join table \"{1}\"
 VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG=In implied attribute \"{0}\", catalog \"{1}\" cannot be resolved for join table \"{2}\"
 VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA=In implied attribute \"{0}\", schema \"{1}\" cannot be resolved for join table \"{2}\"
-JOIN_TABLE_UNRESOLVED_NAME=Join table \"{0}\" cannot be resolved
+JOIN_TABLE_CANNOT_BE_DETERMINED=Target Entity for \"{0}\" not defined - join table cannot be determined
 VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME=In implied attribute \"{0}\", join table \"{1}\" cannot be resolved
 COLUMN_UNRESOLVED_TABLE=Table \"{0}\" for column \"{1}\" cannot be resolved
 VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_TABLE=In implied attribute \"{0}\", table \"{1}\" for column \"{2}\" cannot be resolved
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java
index 0dde641..a0c6568 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTable.java
@@ -538,11 +538,12 @@
 		}
 		
 		if ( ! this.isResolved()) {
+			String attributeName = this.getRelationshipMapping().getPersistentAttribute().getName();
 			messages.add(
 				DefaultJpaValidationMessages.buildMessage(
 						IMessage.HIGH_SEVERITY,
-						JpaValidationMessages.JOIN_TABLE_UNRESOLVED_NAME,
-						new String[] {this.getName()}, 
+						JpaValidationMessages.JOIN_TABLE_CANNOT_BE_DETERMINED,
+						new String[] {attributeName}, 
 						this, 
 						this.getNameTextRange(astRoot))
 				);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java
index 5d6fd8a..17dbde1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTable.java
@@ -540,11 +540,12 @@
 				);
 			}
 			else {
+				String attributeName = mapping.getPersistentAttribute().getName();
 				messages.add(
 					DefaultJpaValidationMessages.buildMessage(
 						IMessage.HIGH_SEVERITY,
-						JpaValidationMessages.JOIN_TABLE_UNRESOLVED_NAME,
-						new String[] {this.getName()},
+						JpaValidationMessages.JOIN_TABLE_CANNOT_BE_DETERMINED,
+						new String[] {attributeName},
 						this,
 						this.getNameTextRange())
 				);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
index 303902d..d47457b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
@@ -58,7 +58,7 @@
 	public static final String JOIN_TABLE_UNRESOLVED_SCHEMA = "JOIN_TABLE_UNRESOLVED_SCHEMA";
 	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG";
 	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA";
-	public static final String JOIN_TABLE_UNRESOLVED_NAME = "JOIN_TABLE_UNRESOLVED_NAME";
+	public static final String JOIN_TABLE_CANNOT_BE_DETERMINED = "JOIN_TABLE_CANNOT_BE_DETERMINED";
 	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME";
 	public static final String COLUMN_UNRESOLVED_TABLE = "COLUMN_UNRESOLVED_TABLE";
 	public static final String VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_TABLE = "VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_TABLE";