Skip to main content


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] Thu, 18 October 2012 01:18 Go to next message
Rice Yeh is currently offline Rice YehFriend
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 15:22 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
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 17:56 Go to previous message
James Sutherland is currently offline James SutherlandFriend
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 Mar 28 17:28:33 GMT 2024

Powered by FUDForum. Page generated in 0.04717 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top