This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Abstract Superclass DELETE not mapped error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Abstract Superclass DELETE not mapped error" Watch "Abstract Superclass DELETE not mapped error" New topic
Author

Abstract Superclass DELETE not mapped error

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 103
Hello,

using hibernate-jpa-2.1-api 1.0.0.Final, hibernate-entitymanager 4.0.1.Final
I want to use an abstract superclass


When I run the named queries I get


How can I find all instances or delete all instances in this kind of class hierachy?

Thanks

Hans
Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 103
OK answer is
replace @MappedSuperclass with @Entity
MappedSuperclasses cannot be used in queries.

Question: Is there any advantage to use @MappedSuperclass instead of @Entity
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract Superclass DELETE not mapped error