Entity serializer, remove AbstractEntity::toArray