Title:
Bug 82269:(Watson Migration Closure)When an entity maps an one-to-many relationship to a subclass, and the subclass uses joinColumn & discriminatorValueExpect: FK to entity in subclass table onlyActual: FK in subclass table AS WELL AS i
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)
Created: 02/26/2010
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:
When an entity maps an one-to-many relationship to a subclass, and the subclass uses joinColumn & discriminatorValueExpect: FK to entity in subclass table onlyActual: FK in subclass table AS WELL AS in parentclass table
Method:
// Animal.cfccomponent persistent="true" discriminatorcolumn="type" table="animal"{ property name="animalId" fieldtype="id" generator="native";} // Cat.cfccomponent persistent="true" extends="Animal" joincolumn="animalId" discriminatorvalue="cat" table="cat"{ property name="owner" fieldtype="many-to-one" cfc="Owner" fkcolumn="ownerId"; property name="catname";}// Owner.cfc // comment out cats and FK no longer 'leaks' to Animalcomponent persistent="true"{ property name="ownerId" fieldtype="id" generator="native"; property name="cats" type="array" fieldtype="one-to-many" cfc="cat" fkcolumn="ownerId" inverse="true" cascade="all" ;}
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041042
External Customer Info:
External Company:
External Customer Name: Henry Ho
External Customer Email: 237A22C24921EDF5992015B9
External Test Config: 02/26/2010
Attachments:
Comments: