Skip to content

Commit 91c0798

Browse files
author
gary houbre
committed
Review and fix
1 parent 90d8242 commit 91c0798

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

serializer.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,15 @@ to your class::
147147
use Symfony\Component\Serializer\Annotation\Groups;
148148
149149
/**
150-
* @ORM\Entity()
151-
*/
150+
* @ORM\Entity()
151+
*/
152152
class Product
153153
{
154-
155-
/**
154+
/**
156155
* @ORM\Id
157156
* @ORM\GeneratedValue
158157
* @ORM\Column(type="integer")
159-
* @Groups({"show_product", "list_product"})
158+
* @Groups({"show_product", "list_product"})
160159
*/
161160
private $id;
162161

@@ -165,19 +164,12 @@ to your class::
165164
* @Groups({"show_product", "list_product"})
166165
*/
167166
private $name;
168-
169-
/**
170-
* @ORM\Column(type="integer")
171-
* @Groups({"show_product", "list_product"})
172-
*/
173-
private $price;
174167
175168
/**
176169
* @ORM\Column(type="integer")
177170
* @Groups({"show_product"})
178171
*/
179172
private $description;
180-
181173
}
182174

183175
You can now choose which groups to use when serializing::

0 commit comments

Comments
 (0)