]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/config/doctrine/Dance.orm.yml
Replace body with base template
[airbundle] / Resources / config / doctrine / Dance.orm.yml
index 6427d1ac1f89219817b9c2a07678419f1ce20d22..0d241cc153545cc065315095c3e8db83993857c7 100644 (file)
@@ -1,6 +1,6 @@
 Rapsys\AirBundle\Entity\Dance:
     type: entity
-    #repositoryClass: Rapsys\AirBundle\Repository\DanceRepository
+    repositoryClass: Rapsys\AirBundle\Repository\DanceRepository
     table: dances
     id:
         id:
@@ -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']