]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/config/doctrine/Location.orm.yml
Replace body with base template
[airbundle] / Resources / config / doctrine / Location.orm.yml
index 211cbc4295724bda5a928de05306e3dfbf45b05c..9d261442e0dd6be5c47913e52bba2399cfd8327c 100644 (file)
@@ -13,9 +13,9 @@ Rapsys\AirBundle\Entity\Location:
         title:
             type: string
             length: 32
-        short:
-            type: string
-            length: 16
+        description:
+            type: text
+            nullable: true
         address:
             type: string
             length: 32
@@ -33,6 +33,8 @@ Rapsys\AirBundle\Entity\Location:
             type: decimal
             precision: 9
             scale: 6
+        indoor:
+            type: boolean
         hotspot:
             type: boolean
         created:
@@ -46,7 +48,18 @@ Rapsys\AirBundle\Entity\Location:
         snippets:
             targetEntity: Rapsys\AirBundle\Entity\Snippet
             mappedBy: location
+    manyToMany:
+        users:
+            targetEntity: Rapsys\AirBundle\Entity\User
+            mappedBy: locations
     indexes:
         #XXX: used in SessionRepository::(findAllPendingDailyWeather|findAllPendingHourlyWeather)
         zipcode:
             columns: [ zipcode ]
+        city_zipcode3:
+            columns: [ city, zipcode ]
+            #XXX: see https://github.com/doctrine/dbal/pull/2412 and https://stackoverflow.com/questions/32539973/configuring-index-text-length-mysql-in-doctrine
+            options:
+                lengths: [ ~, 3 ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']