Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359690 - [EclipseLink] converter validation too strict if converters are named the same but not in conflict
Summary: [EclipseLink] converter validation too strict if converters are named the sam...
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Nan Li CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 07:43 EDT by Karen Butzke CLA
Modified: 2011-10-21 16:01 EDT (History)
1 user (show)

See Also:
neil.hauge: review+


Attachments
Proposed Patch (82.83 KB, patch)
2011-10-14 17:46 EDT, Nan Li CLA
no flags Details | Diff
Proposed Patch (83.92 KB, patch)
2011-10-20 16:49 EDT, Nan Li CLA
neil.hauge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2011-10-03 07:43:30 EDT
If you define the same converter in multiple locations in your object model you get a validation error saying that they are duplicate. EclipseLink only says they are duplicate if the definition is actually different. So if it is a different type of converter or the converter class that it points to is different. We need to loosen up our validation for this case.

	@Converter(
	name="booleanConverter",	
	converter=BooleanConverter.class)

Workaround is to remove the converter definition from all locations in the java source and define it instead in the persistence unit defaults of an orm.xml file.
Comment 1 Nan Li CLA 2011-10-14 17:46:10 EDT
Created attachment 205237 [details]
Proposed Patch

The validation works as the following:

1. No message is given with identical converters
2. An information message is given with identical generators and queries. The  message says something like Identical ... defined in this persistence unit, which may not be portable
Comment 2 Nan Li CLA 2011-10-20 16:49:10 EDT
Created attachment 205677 [details]
Proposed Patch

Added comments to the validation methods
Comment 3 Neil Hauge CLA 2011-10-21 16:01:29 EDT
Patch applied to head.