summary | 
shortlog | 
log | 
commit | commitdiff | 
tree
raw | 
patch | 
inline | side by side (from parent 1: 
52464df)
 
Set nullable slug
Add locale field
Add preUpdate callback
             type: integer
             options:
                 unsigned: true
             type: integer
             options:
                 unsigned: true
-        language_id:
-            type: smallint
-            options:
-                unsigned: true
+        locale:
+            type: string
+            length: 5
+        body:
+            type: text
+            nullable: true
+        description:
+            type: text
+            nullable: true
         slug:
             type: string
             length: 128
         slug:
             type: string
             length: 128
         title:
             type: string
             length: 128
         title:
             type: string
             length: 128
-        description:
-            type: text
-        body:
-            type: text
         created:
             type: datetime
         updated:
         created:
             type: datetime
         updated:
         article:
             targetEntity: Rapsys\BlogBundle\Entity\Article
             inversedBy: article_translations
         article:
             targetEntity: Rapsys\BlogBundle\Entity\Article
             inversedBy: article_translations
-        language:
-            targetEntity: Rapsys\BlogBundle\Entity\Language
-            inversedBy: article_translations
+            joinColumn:
+                nullable: false
-        slug_language:
-            columns: [ slug, language_id ]
+        locale_slug:
+            columns: [ locale, slug ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']