ZF-7225: mysql result handler doesn't return expected array of objects
Description
mysql result handler returns an arraycollection of arrays instead of arraycollection of objects because of which applications fail at runtime.
mysql result handler returns an arraycollection of arrays instead of arraycollection of objects because of which applications fail at runtime.
Comments
Posted by Stanislav Malyshev (stas) on 2009-07-08T11:04:59.000+0000
Could you please provide a code example of what you were doing, what you have received and what you expected to receive?
Posted by Mayank Kumar (mayankk) on 2009-07-17T05:53:32.000+0000
arrayOfArray.PNG, the result being received when mysql_result is returned from an amf operation.
Posted by Mayank Kumar (mayankk) on 2009-07-17T05:54:08.000+0000
arrayOfObjects.PNG, expected result when result is returned.
Posted by Mayank Kumar (mayankk) on 2009-07-17T06:00:45.000+0000
Please refer to the 104Kb arrayOfObjects.PNG instead of the 85Kb one.
The mysql result handler fetches result using mysql_fetch_assoc while iterating through the rows of the result. It would be great if it could use mysql_fetch_object and then set the types of each of the fields of the fetched object.
Posted by Stanislav Malyshev (stas) on 2009-07-20T13:55:12.000+0000
Switched to return objects.