tracker issue : CF-3038294

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

Bug 76791:(Watson Migration Closure)Include support for grouping of properties under one reference

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Devin Holloway / Devin Holloway (Devin Holloway)

Created: 04/23/2009

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

Include support for grouping of properties under one reference.

This is not a request for support in CFC entities but rather, for this work if created in the hbm.xml files (Although direct support in CFC entities would be even better!)

Property grouping is a way to achieve some exotic joins that, although uncommon, could potentially be needed from time to time, especially in cases that you’re dealing with legacy databases in with strange relationships and aren’t allowed to make changes to. That and the idea that... if we can’t configure hibernate as we need in our CFC entities, we should, at least, be able to accomplish what we need in the hbm.xml files. 
Method:

Using the code below in a set of hbm.xml files:

Profile.hbm.xml
<one-to-one name="primaryPhoto" class="cfc:model.Photo" property-ref="primaryReference">
  <formula>’true’</formula>
  <formula>account_id</formula>
</one-to-one>

Photo.hbm.xml
  <properties name="primaryReference">
  <property name="primary" type="boolean" column="photo_primary"/>
  <many-to-one name="profile" class="cfc:model.Profile" column="account_id"/>
</properties>

The expected result for the Profile cfc would be:

Profile
-primaryPhoto
-(other properties)

But the actual result is:

Profile
-primary
-profile
-(other properties)

It appears to be taking all the properties inside the <properties name="primaryReference"> node of the Photo.hbm.xml and just making them properties of the Profile.cfc.
Result:

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

Watson Bug ID:	3038294

External Customer Info:
External Company:  
External Customer Name: Devin Holloway
External Customer Email: 5E060FD6422E831A992015D5
External Test Config: 04/23/2009

Attachments:

Comments:

https://wikidocs.adobe.com/wiki/display/coldfusionen/Advanced+mapping
Comment by Himavanth R.
23778 | July 01, 2014 03:03:05 AM GMT
You can achieve this using advanced mapping: https://wikidocs.adobe.com/wiki/display/coldfusionen/Advanced+mapping (Comment added from ex-user id:nawani)
Comment by Adobe D.
23779 | December 04, 2014 05:09:22 AM GMT