Skip to content

Commit a5828b2

Browse files
authored
Review registration form cookbook (#883)
1 parent fcf376c commit a5828b2

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/cookbook/registration_form.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,22 @@ We begin this tutorial with the model for a ``User`` document:
1919
namespace App\Document;
2020
2121
use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique as MongoDBUnique;
22-
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
22+
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
2323
use Symfony\Component\Validator\Constraints as Assert;
2424
25-
#[MongoDB\Document(collection: 'users')]
26-
#[MongoDB\Unique(fields: 'email')]
25+
#[ODM\Document(collection: 'users')]
26+
#[ODM\Unique(fields: 'email')]
2727
class User
2828
{
29-
/**
30-
* @MongoDB\Id
31-
*/
32-
#[MongoDB\Id]
29+
#[ODM\Id]
3330
protected string $id;
3431
35-
#[MongoDB\Field(type: 'string')]
32+
#[ODM\Field(type: 'string')]
3633
#[Assert\NotBlank]
3734
#[Assert\Email]
3835
protected ?string $email = null;
3936
40-
#[MongoDB\Field(type: 'string')]
37+
#[ODM\Field(type: 'string')]
4138
#[Assert\NotBlank]
4239
protected ?string $password = null;
4340

0 commit comments

Comments
 (0)