Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Why tables for abstract classes with TablePerClass inheritance are created?
Why tables for abstract classes with TablePerClass inheritance are created? [message #948359] Wed, 17 October 2012 21:18 Go to next message
Rice Yeh is currently offline Rice Yeh
Messages: 20
Registered: July 2009
Junior Member
Hi,
Why table for an abstract class with inheritance strategy TablePerClass is created? Is not it that tables are created only for concrete classes for TAblePerClass inheritance strategy?

Rice
Re: Why tables for abstract classes with TablePerClass inheritance are created? [message #950045 is a reply to message #948359] Fri, 19 October 2012 11:22 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1017
Registered: July 2009
Senior Member
Use a mapped superclass instead of marking it as an entity if you do not want a table for that class. I've been told that from a JPA perspective, entities can be used within queries, while mapped supperclasses cannot. So all entities require associated tables or they cannot be put within queries. Even though an abstract entity cannot be instantiated, queries using it could return raw data or to filter other entity results.

Best Regards,
Chris
Re: Why tables for abstract classes with TablePerClass inheritance are created? [message #964666 is a reply to message #950045] Tue, 30 October 2012 13:56 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

This is a bug, please log the bug and vote for it. (ensure you are using the latest release first, as it may have been fixed already).


James : Wiki : Book : Blog : Twitter
Previous Topic:MongoDB and passwords
Next Topic:DynamicEntity is not Serializable
Goto Forum:
  


Current Time: Thu Aug 21 00:43:38 EDT 2014

Powered by FUDForum. Page generated in 0.10538 seconds