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

Bug 311773

Summary: ID derived identity is selected when id="false" is used in XML
Product: [WebTools] Dali JPA Tools Reporter: Paul Fullbright <paul.fullbright>
Component: GeneralAssignee: Paul Fullbright <paul.fullbright>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, karenfbutzke, neil.hauge
Version: 2.3Flags: david_williams: pmc_approved+
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved? (neil.hauge)
neil.hauge: pmc_approved? (kaloyan)
neil.hauge: review+
Target Milestone: 2.3 RC1   
Hardware: PC   
OS: Windows Vista   
Whiteboard: PMC_approved
Attachments:
Description Flags
proposed patch none

Description Paul Fullbright CLA 2010-05-05 14:19:32 EDT
Created attachment 167191 [details]
proposed patch

for the following entity in XML,

	<entity class="foo">
		<attributes>
			<many-to-one name="bar" id="false">
			</many-to-one>
		</attributes>
	</entity>

The "ID" option under the "Derived Identity" section is checked.


The attached patch simply changes the logic for GenericOrmIdDerivedIdentityStrategy.isSpecified() from checking whether the "id" attribute is present to checking whether it is set to true.  Low risk.
Comment 1 Neil Hauge CLA 2010-05-05 15:03:56 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug"
(requested by an adopter) please document it as such. 

UI shows something set as True when it may be set to false in the metadata. 
This could be very confusing to the user.

* Is there a work-around? If so, why do you believe the work-around is
insufficient? 

No workaround.

* How has the fix been tested? Is there a test case attached to the bugzilla
record? Has a JUnit Test been added? 

Developer tested.

* Give a brief technical overview. Who has reviewed this fix? 

See comment 0.

* What is the risk associated with this fix? 

Very low risk.  Simple change.
Comment 2 David Williams CLA 2010-05-05 15:31:30 EDT
I assume the meaning of "isSpecified" is explained in the JavaDoc? And is does not mean "specified in the file"?
Comment 3 Paul Fullbright CLA 2010-05-05 15:48:36 EDT
This is internal, so there is no javadoc for it.  However the API means whether the strategy is specified, which when id="false" is used, it is explicitly *not* specified.
Comment 4 Neil Hauge CLA 2010-05-05 18:16:36 EDT
Committed to head.
Comment 5 Karen Butzke CLA 2010-05-10 15:27:44 EDT
verified fixed in build WTP-I-3.2.0-20100507065327