@@ -35,7 +35,7 @@ your user table:
35
35
36
36
.. code-block :: php-annotations
37
37
38
- // src/AppBundle/Entity/Author .php
38
+ // src/AppBundle/Entity/User .php
39
39
namespace AppBundle\Entity;
40
40
41
41
use Symfony\Component\Validator\Constraints as Assert;
@@ -48,7 +48,7 @@ your user table:
48
48
* @ORM\Entity
49
49
* @UniqueEntity("email")
50
50
*/
51
- class Author
51
+ class User
52
52
{
53
53
/**
54
54
* @ORM\Column(name="email", type="string", length=255, unique=true)
@@ -60,7 +60,7 @@ your user table:
60
60
.. code-block :: yaml
61
61
62
62
# src/AppBundle/Resources/config/validation.yml
63
- AppBundle\Entity\Author :
63
+ AppBundle\Entity\User :
64
64
constraints :
65
65
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity : email
66
66
properties :
@@ -75,7 +75,7 @@ your user table:
75
75
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
76
76
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping https://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
77
77
78
- <class name =" AppBundle\Entity\Author " >
78
+ <class name =" AppBundle\Entity\User " >
79
79
<constraint name =" Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity" >
80
80
<option name =" fields" >email</option >
81
81
</constraint >
@@ -87,15 +87,15 @@ your user table:
87
87
88
88
.. code-block :: php
89
89
90
- // src/AppBundle/Entity/Author .php
90
+ // src/AppBundle/Entity/User .php
91
91
namespace AppBundle\Entity;
92
92
93
93
use Symfony\Component\Validator\Constraints as Assert;
94
94
95
95
// DON'T forget this use statement!!!
96
96
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
97
97
98
- class Author
98
+ class User
99
99
{
100
100
public static function loadValidatorMetadata(ClassMetadata $metadata)
101
101
{
0 commit comments