Skip to content

Commit

Permalink
Readme: use attributes over entity (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored Jan 30, 2023
1 parent cf60411 commit 4696cb7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,9 @@ WHERE u0_.id = 1
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):

```php
/**
* @ORM\Table(
* name=User::TABLE_NAME,
* indexes={
* @ORM\Index(name=User::IDX_FOO, columns={"id"})
* }
* )
* @ORM\Entity
*/
#[ORM\Table(name: self::TABLE_NAME)]
#[ORM\Index(name: self::IDX_FOO, columns: ['id'])]
#[ORM\Entity]
class User
{
public const TABLE_NAME = 'user';
Expand Down

0 comments on commit 4696cb7

Please sign in to comment.