Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330618 - [Validation] Need validation for Variable-One-To-One
Summary: [Validation] Need validation for Variable-One-To-One
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard: EclipseLink
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-18 16:39 EST by Nan Li CLA
Modified: 2011-07-01 16:23 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 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.