tracker issue : CF-3039823

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

Bug 79640:(Watson Migration Closure)sqltype"char(n)" cannot be used as FK for a many-to-one object

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

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

Created: 08/30/2009

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: 2

Listed in the version 2016.0.0.297996 Issues Fixed doc
Problem:

sqltype"char(n)" cannot be used as FK for a many-to-one object.
Method:

component persistent=true entityName="parent" {     // this doesn't work     property name="parentId" fieldtype="id" sqltype="char(2)";} 
component persistent=true entityName="child" {     property name="childID" fieldtype="id" ormtype="integer" generator="identity";     property name="parent" fieldtype="many-to-one" fkcolumn="parentId" cfc="parent";}
Result:

Error during DDL export

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

Watson Bug ID:	3039823

External Customer Info:
External Company:  
External Customer Name: Henry Ho
External Customer Email: 237A22C24921EDF5992015B9
External Test Config: 08/30/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
22940 | November 10, 2011 07:00:49 PM GMT
This bug has been voted..
Vote by External U.
22941 | November 10, 2011 07:00:50 PM GMT
This issue is fixed and will be part of next major release of ColdFusion. To fix this, child component should also have sqltype attribute in the FK property. Parent.cfc component persistent=true entityName="parent" { // this doesn't work property name="parentId" fieldtype="id" sqltype="char(2)";} Child.cfc component persistent=true entityName="child" { property name="childID" fieldtype="id" ormtype="integer" generator="identity"; property name="parent" fieldtype="many-to-one" fkcolumn="parentId" cfc="parent" sqltype="char(2)";}
Comment by Nimit S.
22939 | June 17, 2015 05:33:50 AM GMT