Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313574 - Lower case primary key column association does not work when upper casing flag is set to true
Summary: Lower case primary key column association does not work when upper casing fla...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Guy Pelletier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 12:50 EDT by Guy Pelletier CLA
Modified: 2022-06-09 10:07 EDT (History)
1 user (show)

See Also:


Attachments
Proposed changes (10.22 KB, patch)
2010-05-20 11:02 EDT, Guy Pelletier CLA
no flags Details | Diff
Amendment to original fix (1.37 KB, patch)
2010-05-20 13:36 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Pelletier CLA 2010-05-19 12:50:27 EDT
Example:

<entity name="Boat" class="Boat" access="PROPERTY">
  ...
  <primary-key-join-column name="boat_id" referenced-column-name="id"/>


<entity name="Person" class="Person" access="PROPERTY">
  ...
  <attributes>
    <many-to-one name="boat" target-entity="Boat">
      <join-column name="b_id" referenced-column-name="boat_id"/>
    </many-to-one>

Our code to associate boat_id with Bus's parent 'id' column would fail if the uppercasing flag was set to true (which it is by default)

Reason:
 1- Primary key join columns are processed first and upper cased
 2- By the time we process the many-to-one, when we look up the primary key association for 'boat_id' it won't be found since on the association map it will be 'BOAT_ID' and we therefore don't find the association.
Comment 1 Guy Pelletier CLA 2010-05-20 11:02:12 EDT
Created attachment 169358 [details]
Proposed changes
Comment 2 Guy Pelletier CLA 2010-05-20 11:18:15 EDT
Changes have been submitted.

Reviewed by: Chris Delahunt

Tests: New test (testPKJoinColumnAssociation) added to EntityMappingsInheritanceJUnitTestCase
Comment 3 Guy Pelletier CLA 2010-05-20 13:36:29 EDT
Created attachment 169385 [details]
Amendment to original fix

After review from Gordon Yorke.

Takes into consideration delimeted identifiers
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:07:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink