]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Resources/config/doctrine/User.orm.yml
Add entity and user repositories
[userbundle] / Resources / config / doctrine / User.orm.yml
index a6a37f3620aa50fed96a991d72b7700619be2c03..a88425fa062fbfac1f5edb13cda2e0f35266e6c1 100644 (file)
@@ -1,5 +1,7 @@
 Rapsys\UserBundle\Entity\User:
     type: mappedSuperclass
+    repositoryClass: Rapsys\UserBundle\Repository\UserRepository
+#   table: users
     id:
         id:
             type: integer
@@ -12,15 +14,14 @@ Rapsys\UserBundle\Entity\User:
             type: string
             unique: true
             length: 254
-        pseudonym:
-            type: string
-            length: 32
         forename:
             type: string
             length: 32
+            nullable: true
         surname:
             type: string
             length: 32
+            nullable: true
         password:
             type: string
             length: 60
@@ -28,18 +29,30 @@ Rapsys\UserBundle\Entity\User:
             type: boolean
             options:
                 default: true
+        enable:
+            type: boolean
+            options:
+                default: true
         created:
             type: datetime
         updated:
             type: datetime
     manyToOne:
-        title:
-            targetEntity: Title
+        civility:
+            targetEntity: Civility
             inversedBy: users
     manyToMany:
         groups:
             targetEntity: Group
             inversedBy: users
 #see if usefull: https://stackoverflow.com/questions/34523699/how-to-extend-doctrine-entity-in-another-bundle
-#            joinTable:
-#                name: groups_users
+#           joinTable:
+#               name: users_groups
+#               joinColumns:
+#                   id:
+#                       name: user_id
+#               inverseJoinColumns:
+#                   id:
+#                       name: group_id
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']