wood burning stoves 2.0*
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
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: 100
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: 100
OK answer is
replace @MappedSuperclass with @Entity
MappedSuperclasses cannot be used in queries.

Question: Is there any advantage to use @MappedSuperclass instead of @Entity
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Abstract Superclass DELETE not mapped error
 
Similar Threads
OneToOne Relation Exception
incomplete @JoinColumns
named queries can be defined only on an entity - problem
About Named Queries
Mapping entities