This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design 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: 114
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: 114
OK answer is
replace @MappedSuperclass with @Entity
MappedSuperclasses cannot be used in queries.

Question: Is there any advantage to use @MappedSuperclass instead of @Entity
 
Have you checked out Aspose?
 
subject: Abstract Superclass DELETE not mapped error
 
It's not a secret anymore!