tracker issue : CF-3041619

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

Bug 83225:Extended entity not saved correctly by cascade

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)

Created: 06/02/2010

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Duplicate ID:	CF-3040538

Problem:

Extended entity not saved correctly by cascade
Method:

/** Car.cfc */component persistent="true"{property name="id" fieldtype="id" generator="native";property name="part" fieldtype="many-to-one" cfc="Part" fkcolumn="partID" cascade="all";}/** Part.cfc */component persistent="true" discriminatorcolumn="type"{property name="id" fieldtype="id" generator="native";property name="serialNumber";}/** Engine.cfc */component persistent="true" extends="part" discriminatorvalue="engine" joincolumn="id"{property name="horsePower";}/** test.cfm */engine = new engine();engine.setHorsePower(200);engine.setSerialNumber("K24");c = new car();c.setPart(engine);entitySave(c);// expect: 1 entry in Part table, type='engine', 1 entry in Engine table// actual: 1 entry in Part table, type = 'part', no entry in Engine table/** workaround.cfm  - bypass cascade */engine = new engine();engine.setHorsePower(200);engine.setSerialNumber("K24");entitySave(engine);c = new car();c.setPart(engine);entitySave(c);
Result:

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

Watson Bug ID:	3041619

External Customer Info:
External Company:  
External Customer Name: Henry Ho
External Customer Email: 237A22C24921EDF5992015B9
External Test Config: 06/02/2010

Attachments:

Comments: