Title:
Bug 77314:Dumping entities with properties of char or character datatype will output a dump of object of java
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Nathan Mische / Nathan Mische (Nathan Mische)
Created: 05/18/2009
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 235127
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
Dumping entities with properties of char or character datatype will output a dump of object of java.lang.Character under PROPERTIES, rather than the simple character value. This only happens after persisting the entity. Before persisting the entity the property dump shows the charater value.
Method:
Sample Entity:
<cfcomponent persistent="true" entityname="User" table="Users">
<cfproperty name="UserID" fieldtype="id" generator="native" />
<cfproperty name="FirstName" datatype="string" length="100" />
<cfproperty name="MI" datatype="char" notnull="false" />
<cfproperty name="LastName" datatype="string" length="100" />
</cfcomponent>
Sample Code:
<cfscript>
user = createObject("User");
user.setFirstName("Test");
user.setMI("A");
user.setLastName("User");
writeDump(user); // correct output "A" for MI property
entitySave(user);
writeDump(user); // dumps java object for MI property
</cfscript>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3038612
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Nathan Mische
External Customer Email: 8183044544637AAA99201549
External Test Config: 05/18/2009
Attachments:
Comments: