Zend Framework

mysql result handler doesn't return expected array of objects

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.9.0
  • Component/s: Zend_Amf
  • Labels:
    None

Description

mysql result handler returns an arraycollection of arrays instead of arraycollection of objects because of which applications fail at runtime.

Activity

Hide
Stanislav Malyshev added a comment -

Could you please provide a code example of what you were doing, what you have received and what you expected to receive?

Show
Stanislav Malyshev added a comment - Could you please provide a code example of what you were doing, what you have received and what you expected to receive?
Hide
Mayank Kumar added a comment -

arrayOfArray.PNG, the result being received when mysql_result is returned from an amf operation.

Show
Mayank Kumar added a comment - arrayOfArray.PNG, the result being received when mysql_result is returned from an amf operation.
Hide
Mayank Kumar added a comment -

arrayOfObjects.PNG, expected result when result is returned.

Show
Mayank Kumar added a comment - arrayOfObjects.PNG, expected result when result is returned.
Hide
Mayank Kumar added a comment -

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.

Show
Mayank Kumar added a comment - 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.
Hide
Stanislav Malyshev added a comment -

Switched to return objects.

Show
Stanislav Malyshev added a comment - Switched to return objects.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: