Bug 317822 - composite ids using sequencing should allow zero
Summary: composite ids using sequencing should allow zero
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-06-24 09:57 EDT by James Sutherland CLA
Modified: 2022-06-09 10:34 EDT (History)
0 users

See Also:


Attachments
patch (36.21 KB, patch)
2010-06-24 09:59 EDT, James Sutherland CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Sutherland CLA 2010-06-24 09:57:00 EDT
Currently any id that uses a sequence number default to not allowing zero.
If you have a composite id that has one sequence, and one non-sequence, the non-sequence should allow zero, or at least be able to be configured independently to the sequence.
Comment 1 James Sutherland CLA 2010-06-24 09:59:16 EDT
Fixed by adding a primaryKeyIdValidations to descriptor that allow id pk field to be configured to have a different validation.  All default to the descriptor's IdValidation if set, otherwise project default, otherwise don't allow 0 unless composite, but sequence does allow 0.
Comment 2 James Sutherland CLA 2010-06-24 09:59:41 EDT
Created attachment 172613 [details]
patch
Comment 3 James Sutherland CLA 2010-06-24 10:01:51 EDT
Patch also includes some memory test cases.
Also enhances error message thrown when id is invalid.
Comment 4 James Sutherland CLA 2010-06-28 09:55:32 EDT
Fixed in 2.2 (trunck) and 2.1.1 (2.1)
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:34:36 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink