tracker issue : CF-3036950

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 73961:[ORM] One-to-one relationships using the fkcolumn approach doesn't work

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): João Fernandes / João Fernandes (Joao Fernandes)

Created: 12/03/2008

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Major / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

[ORM] One-to-one relationships using the fkcolumn approach doesn't work.
generated hbm.xml is using many-to-one instead of one-to-one.
The problem is described here https://prerelease.adobe.com/project/forum/thread.html?cap=87529BDA13744B3DB718E841890B9240&forid={936680A8-3CD1-4D52-BCEE-9EF903D7FB02}&topid={B48A7C42-2AEE-4BFB-B1B0-C30E8A54FC9C}. Having one-to-one relationships in both related components throws an error.






Method:

get the files from here https://prerelease.adobe.com/files/download.aspx?d=37B4B43FA2784BB8AA24597F283B9541&p=87529BDA13744B3DB718E841890B9240&r=71120222A2A84E04BC3FFF88DB000D97&s=C7FCE14EED494D64AED11F8329787C65&l=E1F0D55F7F5449738500BB24776E96DC

check the generated hbm.xml files and replace 

<many-to-one class="cfc:Teste.Person" column="person_id"
            lazy="proxy" name="Person" unique="true"/>

with 

<one-to-one class="cfc:Teste.Employee" foreign-key="person_id"
            lazy="proxy" name="Employee" />

it works.

Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3036950

External Customer Info:
External Company:  
External Customer Name: João Fernandes
External Customer Email: 4E9A42C244586146992015D5
External Test Config: 12/03/2008

Attachments:

Comments: