I’m actually using Doctrine2 within a Zend Framework project.
I’m build an API to be used as a Restfull webservice, and I’m actually using an Entity Serializer and/or an Array result.
However my problem is my entity are fully serialized therefore fields like password or email are returned.
It is not a problem when working on a private call but it is for public API.
How could I solve this problem?
Had you think about this alternatives:
The last option in fact is a good pratice, cause sometimes it’s not a good idea to use an Entity Bean in the presentation, service, or API layer.