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

Bug 332154

Summary: [Validation] Need validation for the type of targetEntity
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:

Description Nan Li CLA 2010-12-08 12:24:28 EST
Build Identifier: 20100917-0705

When specifying the targetEntity attribute for a relationship mapping, it's necessary to verify the type of the given target entity to check whether or not it's compatible with the type of the mapped property. There are four cases:

1. For one-to-one and many-to-one mapping, type incompatibility should be reported.
2. For one-to-many and many-to-many mapping, no validation error should be reported without using generics.
3. For one-to-many and many-to-many mapping, type incompatibility should be reported with using generics.
4. When the given target entity is a subclass of the type of the mapped property, no validation error should be reported.

Type incompatibility may not lead to deployment error, but could result in broken program.

Reproducible: Always
Comment 1 Neil Hauge CLA 2011-07-01 16:25:53 EDT
Moving JPA specific bugs to new JPA component in bugzilla.