tracker issue : CF-3183868

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

ORM Search Serialization Issue

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Ben Dalton / Ben Dalton (bdalton)

Created: 05/07/2012

Components: REST Services

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Public Beta / 287215

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Linux All

Vote Count: 0

Problem Description:

This may or may not be tied to ORM Search or the REST support.

If I conduct an ORM search inside a REST handler/listener, if I want to return an array of the entities and not the entire ORM search result, I end up with an array of entities with NULL values for each attribute.

Steps to Reproduce:

Create a simple, indexed ORM entity
Construct a RESTFUL listener which conducts an ORM search
Iterate over the ORM search results and append each entity to a new array
Return array of ORM entities as the result of the RESTful method

Actual Result:

Serialized array of entities with null values for each property

Expected Result:

Serialized array of entities with correct values for each property

Any Workarounds:

Added "toStruct" method on ORM entity.
ArrayAppend(resArray, entity.toStruct());
return array of entity structs.
works as expected.

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

Watson Bug ID:	3183868

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: bdalton
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

The code I used to generate these results can be found @ https://github.com/bendalton/cfshoutout The workaround is present in this code. MYHOST/rest/cfshoutout/shoutouts/find/a <-- this returns the correct result with my toStruct workaround, without it, I receive null property values.
Comment by External U.
19527 | May 07, 2012 08:41:16 AM GMT
The properties in the variable scope were not serialized. Only the properties in the THIS scope were serialized. Now after taking all this properties, checking in the variables scope also. If some property is not available in the THIS scope, then they are taken from the variables scope.
Comment by Paul N.
19528 | December 05, 2013 07:07:36 AM GMT
This issue is fixed. Test case location in perforce: qa\cf\regression\newmanual\REST\Bugs\CF-3183868\ (Comment added from ex-user id:nawani)
Comment by Adobe D.
19529 | January 13, 2014 12:58:51 AM GMT