From 765e74165b9c2cc583d4ddc1c0930f94f23fdfbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 4 Oct 2022 09:47:14 +0200 Subject: [PATCH 1/1] Transform title in name and type --- Resources/config/doctrine/Dance.orm.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Resources/config/doctrine/Dance.orm.yml b/Resources/config/doctrine/Dance.orm.yml index e1cba84..0d241cc 100644 --- a/Resources/config/doctrine/Dance.orm.yml +++ b/Resources/config/doctrine/Dance.orm.yml @@ -10,7 +10,10 @@ Rapsys\AirBundle\Entity\Dance: options: unsigned: true fields: - title: + name: + type: string + length: 32 + type: type: string length: 32 created: @@ -25,5 +28,8 @@ Rapsys\AirBundle\Entity\Dance: users: targetEntity: Rapsys\AirBundle\Entity\User mappedBy: dances + uniqueConstraints: + name_type: + columns: [ name, type ] lifecycleCallbacks: preUpdate: ['preUpdate'] -- 2.41.1