You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a strange behavior when i use groups.
When i serialize a Doctrine entity with one relation, the relation is not serialized anymore when using groups.
Here is my configuration : I have 2 entities -- Customer and User -- with a many-to-one relation from Customer to User on the field "created_by".
Hi,
I've a strange behavior when i use groups.
When i serialize a Doctrine entity with one relation, the relation is not serialized anymore when using groups.
Here is my configuration : I have 2 entities -- Customer and User -- with a many-to-one relation from Customer to User on the field "created_by".
Here is a piece of "Entitiy.Customer.yml" :
In my Symfony controller, the code that is serializing is :
With the third line commented, it is working i get the following response :
With the third line uncommented, i get the following response :
It's very strange because between the to different results, nothing change except the line `$serializer->setGroups(array('list'));``
Also, the created_by value is an empty array then I set the type as a User Entity.
Thanks,
Vincent
The text was updated successfully, but these errors were encountered: