tracker issue : CF-3037669

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

Bug 75675:Allow "many-to-one" and "one-to-many" relationships using a link table to be defined in the CFC rather than having to define that in the hibernate xml

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

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

Created: 02/25/2009

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 230958

Priority/Frequency: Major / Unknown

Locale/System: English / Win All

Vote Count: 3

Problem:

Allow "many-to-one" and "one-to-many" relationships using a link table to be defined in the CFC rather than having to define that in the hibernate xml.

I'm specifying a serverity of "high - has workout around difficulte to implement" because although you can achieve it in the hibernate xml, most CF developers won't be familiar with how to create these mapping files.

Method:

This is an example of custom hibernate xml I had to write in order to for an object (Account.cfc) to have a one-to-many relationship with itself through a linked table (account_favorite).

<bag name="favorites" table="account_favorite">
	<key column="account_id"/>
	<many-to-many class="cfc:com.Account" column="favorite_id"
				unique="true"/>
</bag>
Result:

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

Watson Bug ID:	3037669

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Devin Holloway
External Customer Email: 5E060FD6422E831A992015D5
External Test Config: 02/25/2009

Attachments:

Comments:

+1 vote. This is essential.
Vote by External U.
24014 | November 10, 2011 07:16:44 PM GMT
+1 Support for this is a must-have if there is any hope of supporting existing DB schemas without forcing people do drop into XML to configure it.
Vote by External U.
24015 | November 10, 2011 07:16:45 PM GMT
It would be ideal for property tags in CFCs to support everything you can do in JPA/Hibernate annotations in Java/Groovy. Support for specifying link tables seems a bare minimum to me.
Vote by External U.
24016 | November 10, 2011 07:16:47 PM GMT