Fix error when serializing CollectionItems (oPersistent) that have references to other ORM objects.

Fix error when serializing CollectionItems (oPersistent) that have references to other ORM objects.

Otherwhise error is thwon at the very start of TJSONSerializer.WriteObject as aClassType can not be retieved.