I am new to doctrine, In my symfony project all the entity annotation linked with groups but I am not getting what is the use of Groups.
/**
* @ORM\Column(type="string", length=64)
* @Groups({"public","details"})
*/
I have newly added the field in my entity file, while executing the schema update getting (newly added field) was never imported.
What is groups and how it's useful.
Groups is not part of doctrine, and is not necessary unless you need serialize objects to use json or xml (Rest API, etc)
http://symfony.com/doc/current/components/serializer.html#attributes-groups http://symfony.com/blog/new-in-symfony-2-7-serialization-groups
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With