Bug 350220 - Can't commit if a field has annotation @NotNull but is auto incremented
Summary: Can't commit if a field has annotation @NotNull but is auto incremented
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P2 trivial (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-24 05:45 EDT by benjamin.merot CLA
Modified: 2022-06-09 10:33 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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