[
https://issues.apache.org/jira/browse/OPENJPA-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982771#action_12982771
]
Matthias Weßendorf commented on OPENJPA-1926:
---------------------------------------------
I attached a simple demo application
(https://issues.apache.org/jira/secure/attachment/12468581/OPENJPA-1926.zip)
The 'entities' are located in package "net.wessendorf.enterprise.beans"
Friend (concrete @Entity)
Person (abstract @Entity, which extends the @MappedSuperclass)
PersistentObject ((abstract) @MappedSuperclass)
The PersistentObject contains @Id/@GeneratedVlaue; and causes the above error;
When I move them to the abstract Person, it works
=======================================================================
HOW TO START THE APP?
1) unzip
2) type 'mvn' into the shell (this does some downloads and starts up Jetty
container)
3) once the download is done, go to
http://localhost:9090/faces/new_person.xhtml and create a new person/bean
There is a similar issue, when I use @Version inside of that abstract "base
class" (my @MappedSuperclass)
> ClassCastException - org.apache.openjpa.util.Id cannot be cast to
> org.apache.openjpa.util.StringId
> --------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1926
> URL: https://issues.apache.org/jira/browse/OPENJPA-1926
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Fix For: 2.0.1
>
> Attachments: OPENJPA-1926.zip
>
>
> I am getting an ClassCastException (org.apache.openjpa.util.Id cannot be cast
> to org.apache.openjpa.util.StringId)
> when using @Id (and @GeneratedValue) in an (abstract) @MappedSuperclass, that
> is extended by an abstract @Entity bean.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.