I would like to exclude several (especially the password) field of my serialized object.
I have an object that has a relation to: Application\Sonata\UserBundle\Entity\User
When I serialze that object it gives me the user like:
id: 1,
username: "bla",
salt: "fvasdfs9h834sgkcwsg808000w08ccwo",
password: "E7Qsfswef9zdwfNvS6TecQraLYlbsefetRy/DPbqXvyknccxisefesefCicl4IxnXgSOnBx29Tgtp9ceUs1hPg=="
How can I remove the password and salt field?
I tried to alter the Config file at: Application/Sonata/UserBundle/Resources/config/serializer/Entity.User.xml
but it seems to not use that config, even though I cleared the cache...