Doctrine2 entity serializer