Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311773 - ID derived identity is selected when id="false" is used in XML
Summary: ID derived identity is selected when id="false" is used in XML
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 2.3 RC1   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 14:19 EDT by Paul Fullbright CLA
Modified: 2010-05-10 15:27 EDT (History)
3 users (show)

See Also:
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+


Attachments
proposed patch (956 bytes, text/plain)
2010-05-05 14:19 EDT, Paul Fullbright CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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