[ 
https://issues.apache.org/jira/browse/OPENJPA-2396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-2396.
--------------------------------------
    Resolution: Fixed

Already fixed on master: d7dfa322d (OPENJPA-2478, on master): the warning now 
checks isEmbeddable() (PCEnhancer.java:1574), which only @Embeddable sets 
(AnnotationPersistenceMetaDataParser.java:591), so a MappedSuperclass with @Id 
no longer triggers it. Closing; please reopen if this still happens with 
OpenJPA 4.x.

> Wrong error log in PCEnhancer when MappedSuperclass contains Id
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-2396
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2396
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: Enhance
>    Affects Versions: 2.2.2
>            Reporter: Bartosz Jakubowski
>            Priority: Minor
>
> The patch for OPENJPA-2233 logs error message when embeddable entity has Id 
> field. Because MappedSuperclass is set embedded only the message is shown if 
> it contains an Id field. As far as I can see it doesn't break its behavior in 
> any way.
> Don't know if it's just the log condition incorrect or maybe the 
> MappedSuperclass shouldn't be set embedded only in 
> AnnotationPersistenceMetaDataParser lines [555,558]:
>   // while the spec only provides for embedded exclusive, it doesn't
>   // seem hard to support otherwise
>   if (entity == null)
>     meta.setEmbeddedOnly(true);



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to