Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / ext-user (Suchika Singh)
Created: 05/06/2016
Components: Language, Datastructure
Versions: 2016
Failure Type:
Found In Build/Fixed In Build: 2016.0.2.298738 /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Linux All,Mac 10 All,Solaris All,Win XP All
Vote Count: 0
Problem:
Metadata of a struct is not set for the duplicate of the struct.
Method:
<cfscript>
name=[fname='Tom',Lname='Yes'];
name.setmetadata({lname:'string'});
dup_struct=duplicate(name);
writeoutput(#SerializeJson(dup_struct.getmetadata())#);
writeoutput(#SerializeJson(name.getmetadata())#);
writeoutput('Serialized Struct: ' & #SerializeJson(dup_struct)#);
</cfscript>
Result:
{"ordered":"insertion"} {"ordered":"insertion","keys":{"LNAME":"string"}} Serialized Struct: {"FNAME":"Tom","LNAME":true}
Expected:
{"ordered":"insertion","keys":{"LNAME":"string"}} {"ordered":"insertion","keys":{"LNAME":"string"}} Serialized Struct: {"FNAME":"Tom","LNAME":"yes"}
Workaround:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4149367
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: