@@ -15,8 +15,8 @@ The simple User model
15
15
16
16
You have a simple ``User `` entity mapped to the database::
17
17
18
- // src/Acme/AccountBundle/Document /User.php
19
- namespace Acme\AccountBundle\Document ;
18
+ // src/Acme/AccountBundle/Entity /User.php
19
+ namespace Acme\AccountBundle\Entity ;
20
20
21
21
use Doctrine\ORM\Mapping as ORM;
22
22
use Symfony\Component\Validator\Constraints as Assert;
@@ -74,7 +74,7 @@ You have a simple ``User`` entity mapped to the database::
74
74
}
75
75
}
76
76
77
- This ``User `` document contains three fields and two of them (email and
77
+ This ``User `` entity contains three fields and two of them (email and
78
78
password) should display on the form. The email property must be unique
79
79
in the database, this is enforced by adding this validation at the top of
80
80
the class.
@@ -111,7 +111,7 @@ Next, create the form for the ``User`` model::
111
111
112
112
public function getDefaultOptions(array $options)
113
113
{
114
- return array('data_class' => 'Acme\AccountBundle\Document \User');
114
+ return array('data_class' => 'Acme\AccountBundle\Entity \User');
115
115
}
116
116
117
117
public function getName()
@@ -122,7 +122,7 @@ Next, create the form for the ``User`` model::
122
122
123
123
There are just two fields: email and password (repeated to confirm the entered
124
124
password). The ``data_class `` option tells the form the name of data class
125
- (i.e. your ``User `` document ).
125
+ (i.e. your ``User `` entity ).
126
126
127
127
.. tip ::
128
128
@@ -143,12 +143,12 @@ Start by creating a simple class which represents the "registration"::
143
143
144
144
use Symfony\Component\Validator\Constraints as Assert;
145
145
146
- use Acme\AccountBundle\Document \User;
146
+ use Acme\AccountBundle\Entity \User;
147
147
148
148
class Registration
149
149
{
150
150
/**
151
- * @Assert\Type(type="Acme\AccountBundle\Document \User")
151
+ * @Assert\Type(type="Acme\AccountBundle\Entity \User")
152
152
*/
153
153
protected $user;
154
154
0 commit comments