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

Bug 330618

Summary: [Validation] Need validation for Variable-One-To-One
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: EclipseLink

Description Nan Li CLA 2010-11-18 16:39:43 EST
Build Identifier: 20100917-0705

The following validation should be added for the Variable-One-To-One mapping:

1. The type of the mapped instance variable is an interface, not a concrete class.
2. The target interface is indeed an interface and not a class if it is explicitly declared.
3. The declared target interface is assignable to the mapping's property type.
4. Any discriminator class specified must be assignable to the target interface type (Object if that's the type) that is either inferred from the mapping property type or explicitly declared.
5. At least one discriminator class should be given with the required fields, discriminator and discriminator class, specified since the attribute for the mapping is not resolvable without it.
6. There are no duplicates within the enumerated discriminator classes.
7. There are no duplicates within the enumerated discriminators.
8. The discriminator column has a name specified.
9. The given discriminator column exists on the database.
10. All general, property mapping validation rules apply.

Reproducible: Always

Steps to Reproduce:
Try to apply @VariableOneToOne annotation to a Java entity or define a variable-one-to-one mapping in an EclipseLink mapping file.
Comment 1 Neil Hauge CLA 2011-07-01 16:23:24 EDT
Moving JPA specific bugs to new JPA component in bugzilla.