Title:
Bug 79533:You cannot call a setter or getter from a property in the init() / Constructor function
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Nathanael Waite / Nathanael Waite (Nathanael Waite)
Created: 08/21/2009
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,241018 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
You cannot call a setter or getter from a property in the init() / Constructor function.The below function fails. The setName is not allowed. This seems like a bug. The below example is from your site. http://www.adobe.com/devnet/coldfusion/articles/coldfusion9_orm_04.html <cfcomponent hint="I am a musician" output="false" persistent="true"><cfproperty name="musicianID" hint="The id for the musician" type="numeric" fieldtype="id"datatype="integer" generator="identity"><cfproperty name="name" hint="name of the musician" type="string" length="255"><cfproperty name="age" hint="Age of the Musician" type="numeric" datatype="integer"><cffunction name="init" hint="Constructor" access="public" returntype="Musician" output="false"> <cfargument name="name" hint="the name of the musician" type="string" required="no" default=""> <cfscript> setName(arguments.name); return this; </cfscript></cffunction></cfcomponent>
Method:
<cfcomponent hint="I am a musician" output="false" persistent="true"><cfproperty name="musicianID" hint="The id for the musician" type="numeric" fieldtype="id"datatype="integer" generator="identity"><cfproperty name="name" hint="name of the musician" type="string" length="255"><cfproperty name="age" hint="Age of the Musician" type="numeric" datatype="integer"><cffunction name="init" hint="Constructor" access="public" returntype="Musician" output="false"> <cfargument name="name" hint="the name of the musician" type="string" required="no" default=""> <cfscript> setName(arguments.name); return this; </cfscript></cffunction></cfcomponent>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039737
External Customer Info:
External Company:
External Customer Name: Nathanael Waite
External Customer Email: 6D22466341E288C0992016B7
External Test Config: 08/21/2009
Attachments:
Comments: