Jira issue originally created by user nicokaiser:
When receiving entities from the database, collections are received as PersistentCollection objects.
A PersistentCollectionmay not be initialized (i.e. its elements are not loaded), this is done via "_initialize()" when the elements are accessed for the first time (i.e. forAll() or the corresponding "foreach" call).
However when toArray() is called, the _initialize() call is missing, so the method may return an empty array even if the collection has elements.
Shouldn't PersistentCollection::toArray() look like this?
public function toArray()
Comment created by romanb:
Right, we got this reported two times already (this is the third) so I guess I better go fix this now ;)
Should be fixed now.
Issue was closed with resolution "Fixed"