Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338243

Summary: No primary key exception generated when Entity is overriden in the eclipselink-orm.xml
Product: z_Archived Reporter: Karen Butzke <karenfbutzke>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Karen Butzke CLA 2011-02-25 11:48:10 EST
I am testing around with the examples given in:
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Configuration/JPA/Overriding_and_Merging#Overriding_and_Merging_Examples

For example 1, I set it up so that mapping c is an id mapping in the eclipselink-orm.xml and a basic mapping in the orm.xml.  I get an exception reading these:

Exception Description: Entity class [class model.A] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.

I would assume there are plenty of other exceptions like this if an entity is overriden in the eclipselink-orm.xml.


Testing with nightly build: eclipselink-2.3.0.v20110225-r9029
Comment 1 Tom Ware CLA 2011-03-18 09:32:34 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:22:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink