From 4696cb76db5e19544d6e2f71e1eeee13d05ee67b Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Mon, 30 Jan 2023 15:57:14 +0100 Subject: [PATCH] Readme: use attributes over entity (#24) --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5b11285..a81401d 100644 --- a/README.md +++ b/README.md @@ -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';