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 TrackerStatus/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: