Jira issue originally created by user itoijala:
Calling toArray on a PersistentCollection does not initialize the collection. This means that a not yet initialized collection returns an empty array. This is not expected behavior. The user expects the collection to be initialized and the objects returned. Calling count first is a workaround to initialize the array because count calls _initialize.
A use case is an accessor wanting to return an array to not expose the collection to modification.
Comment created by romanb:
Should be fixed now.
Issue was closed with resolution "Fixed"