]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/config/doctrine/User.orm.yml
Remove dance link on session
[airbundle] / Resources / config / doctrine / User.orm.yml
index 4df938e91bb0657c079452cc0eb07d30e43c531e..fc6431c1b2da3f589a53200588d4ea4fc31d93fc 100644 (file)
@@ -1,14 +1,45 @@
 Rapsys\AirBundle\Entity\User:
     type: entity
-    #repositoryClass: Rapsys\AirBundle\Repository\UserRepository
+    repositoryClass: Rapsys\AirBundle\Repository\UserRepository
     table: users
+    fields:
+        phone:
+            type: string
+            length: 16
+            nullable: true
     oneToMany:
-        votes:
-            targetEntity: Rapsys\AirBundle\Entity\Vote
-            mappedBy: user
         applications:
             targetEntity: Rapsys\AirBundle\Entity\Application
             mappedBy: user
+        snippets:
+            targetEntity: Rapsys\AirBundle\Entity\Snippet
+            mappedBy: user
+    manyToMany:
+        subscribers:
+            targetEntity: Rapsys\AirBundle\Entity\User
+            inversedBy: subscriptions
+            joinTable:
+                name: users_subscriptions
+                joinColumns:
+                    id:
+                        name: user_id
+                inverseJoinColumns:
+                    id:
+                        name: subscriber_id
+        subscriptions:
+            targetEntity: Rapsys\AirBundle\Entity\User
+            mappedBy: subscribers
+        locations:
+            targetEntity: Rapsys\AirBundle\Entity\Location
+            inversedBy: users
+            joinTable:
+                name: users_locations
+                joinColumns:
+                    id:
+                        name: user_id
+                inverseJoinColumns:
+                    id:
+                        name: location_id
 #    manyToMany:
 #        groups:
 #            targetEntity: Group
@@ -18,7 +49,7 @@ Rapsys\AirBundle\Entity\User:
     associationOverride:
         groups:
             joinTable:
-                name: groups_users
+                name: users_groups
                 joinColumns:
                     id:
                         name: user_id