mirror of https://github.com/apache/openjpa.git
More informative message when multiple fields used wrongly as primary key
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@722060 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f47c13c68
commit
c28c7830d5
|
@ -1861,7 +1861,8 @@ public class ClassMetaData
|
||||||
throw new MetaDataException(_loc.get("unsupported-id-type",
|
throw new MetaDataException(_loc.get("unsupported-id-type",
|
||||||
_type, pks[0].getName(),
|
_type, pks[0].getName(),
|
||||||
pks[0].getDeclaredType().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)
|
if (_objectId == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -164,9 +164,9 @@ id-types: Type "{0}" does not declare the same identity-type as its persistent \
|
||||||
superclass.
|
superclass.
|
||||||
id-classes: Type "{0}" declares an id class "{1}" that does not match or \
|
id-classes: Type "{0}" declares an id class "{1}" that does not match or \
|
||||||
extend its persistent superclass "{2}" identity class "{3}".
|
extend its persistent superclass "{2}" identity class "{3}".
|
||||||
no-id-class: Type "{0}" with application identity and no superclass does \
|
no-id-class: Entity "{0}" is using composite primary key comprising more than \
|
||||||
not declare an id class. This type is not eligible for builtin \
|
one fields "{1}", but no primary key class has been defined in this class \
|
||||||
identity, so it must declare an id class.
|
or any of its persistent super classes.
|
||||||
bad-pk: Field "{0}" cannot be a primary key. Primary key fields can only be \
|
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 \
|
declared in base persistent classes that also declare their identity-type \
|
||||||
to be "application".
|
to be "application".
|
||||||
|
|
Loading…
Reference in New Issue