openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r722060 - in /openjpa/trunk/openjpa-kernel/src/main: java/org/apache/openjpa/meta/ClassMetaData.java resources/org/apache/openjpa/meta/localizer.properties
Date Mon, 01 Dec 2008 12:42:02 GMT
Author: ppoddar
Date: Mon Dec  1 04:42:00 2008
New Revision: 722060

URL: http://svn.apache.org/viewvc?rev=722060&view=rev
Log:
More informative message when multiple fields used wrongly as primary key

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=722060&r1=722059&r2=722060&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
Mon Dec  1 04:42:00 2008
@@ -1861,7 +1861,8 @@
                 throw new MetaDataException(_loc.get("unsupported-id-type",
                     _type, pks[0].getName(),
                     pks[0].getDeclaredType().getName()));
-            throw new MetaDataException(_loc.get("no-id-class", _type));
+            throw new MetaDataException(_loc.get("no-id-class", _type, 
+            		Arrays.asList(toNames(pks))));
         }
         if (_objectId == null)
             return;

Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties?rev=722060&r1=722059&r2=722060&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
Mon Dec  1 04:42:00 2008
@@ -164,9 +164,9 @@
 	superclass.
 id-classes: Type "{0}" declares an id class "{1}" that does not match or \
 	extend its persistent superclass "{2}" identity class "{3}".
-no-id-class: Type "{0}" with application identity and no superclass does \
-	not declare an id class.  This type is not eligible for builtin \
-	identity, so it must declare an id class.	
+no-id-class: Entity "{0}" is using composite primary key comprising more than \
+	one fields "{1}", but no primary key class has been defined in this class \
+	or any of its persistent super classes. 
 bad-pk: Field "{0}" cannot be a primary key.  Primary key fields can only be \
 	declared in base persistent classes that also declare their identity-type \
 	to be "application".



Mime
View raw message