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

Bug 350220

Summary: Can't commit if a field has annotation @NotNull but is auto incremented
Product: z_Archived Reporter: benjamin.merot
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: trivial    
Priority: P2 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description benjamin.merot CLA 2011-06-24 05:45:40 EDT
If an Entity's field is marked with both:
@GeneratedValue(strategy = GenerationType.IDENTITY)
@NotNul
An exception will be thrown on commit.
Removing the "@NotNull" annotation fixes that. But of course it then no longer matches the table exactly and this annotation is added on generation when mapping against a table.
Comment 1 Tom Ware CLA 2011-07-08 11:10:10 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:15:35 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:33:03 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink