mirror of
https://github.com/apache/openjpa.git
synced 2025-02-08 11:06:01 +00:00
OPENJPA-2478: Fixed erroneous message from the enhancer when a Mapped Superclass contains an @Id.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.3.x@1591685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
52fcb281e1
commit
bbb5acd621
@ -1180,7 +1180,7 @@ public class PCEnhancer {
|
||||
addGetIDOwningClass();
|
||||
}
|
||||
|
||||
if (_meta.isEmbeddedOnly() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) {
|
||||
if (_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) {
|
||||
_log.error(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString()));
|
||||
}
|
||||
|
||||
@ -2753,8 +2753,9 @@ public class PCEnhancer {
|
||||
code.anew().setType(oidType);
|
||||
code.dup();
|
||||
if (_meta.isOpenJPAIdentity() || (obj && usesClsString == Boolean.TRUE)) {
|
||||
if ((_meta.isEmbeddedOnly() && ! (_meta.getIdentityType() == ClassMetaData.ID_APPLICATION))
|
||||
|| _meta.hasAbstractPKField() == true ) {
|
||||
if ((_meta.isEmbeddedOnly()
|
||||
&& !(_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION))
|
||||
|| _meta.hasAbstractPKField() == true) {
|
||||
code.aload().setThis();
|
||||
code.invokevirtual().setMethod(PRE + "GetIDOwningClass", Class.class, null);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user