Skip to content

Commit 4696cb7

Browse files
authored
Readme: use attributes over entity (#24)
1 parent cf60411 commit 4696cb7

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@ WHERE u0_.id = 1
3535
See the used entity (it makes sense to put table names and index names into public constants to bind it together and reference it easily):
3636

3737
```php
38-
/**
39-
* @ORM\Table(
40-
* name=User::TABLE_NAME,
41-
* indexes={
42-
* @ORM\Index(name=User::IDX_FOO, columns={"id"})
43-
* }
44-
* )
45-
* @ORM\Entity
46-
*/
38+
#[ORM\Table(name: self::TABLE_NAME)]
39+
#[ORM\Index(name: self::IDX_FOO, columns: ['id'])]
40+
#[ORM\Entity]
4741
class User
4842
{
4943
public const TABLE_NAME = 'user';

0 commit comments

Comments
 (0)