I am trying to use FOSUserBundle with FOSRestBundle and JMSSerializer.
I have successfully got the RESTFul modules working so i am able to access /api/v1/users/ however it returns all DB fields from FOSUserBundle and i want to be able to specify which ones to provide.
I have got this working on my other modules by adding @Expose to my annotation in the respective modules Entity. However there is no entity for the FOSUserBundle that i can see and when trying to create my own (provided below) it throws up this exception:
MappingException: Duplicate definition of column 'username' on entity 'CYLO\UserBundle\Entity\User' in a field or discriminator column mapping.
Any help appreciated.