tracker issue : CF-3040538

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

Bug 81013:Say I have a User CFC

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Brian Kotek / Brian Kotek (brian428)

Created: 12/07/2009

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 262928

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 2


Say I have a User CFC. User has a one-to-many to UserRole. UserRolehas two subtypes, Customer and Referrer, that extend UserRole viasingle table inheritance. UserRole defines the discriminatorColumn,and Customer and Referrer define their discriminatorValue.So far so good. If I save things like this, it works fine:var role = new Customer();EntitySave( role );var user = new User();user.addUserRole( role );user.setFirstName( "Test1" );EntitySave( user );I end up with a record in the userrole table with a discriminatorValueof "customer", which is correct (it's the value I have defined forthat CFC's discriminatorValue).Now, if I set the one-to-many to cascade="all", and do this:var role = new Customer();var user = new User();user.addUserRole( role );user.setFirstName( "Test1" );EntitySave( user );I still get a record in the userrole table, but this time thediscriminatorValue is NOT "customer", but instead is "UserRole". Whichis obviously very wrong. I have no idea where this value is comingfrom, but the only place I can possiby see is the value of the "cfc"attribute in the one-to-many:property name="userRole" fieldtype="one-to-many"cfc="com.entity.user.UserRole" fkcolumn="userId" type="array"cascade="all";


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

Watson Bug ID:	3040538

External Customer Info:
External Company:  
External Customer Name: Brian Kotek
External Customer Email: 27EF5CB74460F39E99201549
External Test Config: 12/07/2009