]> Raphaƫl G. Git Repositories - blogbundle/blobdiff - config/doctrine/KeywordTranslation.orm.yml
Move doctrine config directly in bundle
[blogbundle] / config / doctrine / KeywordTranslation.orm.yml
diff --git a/config/doctrine/KeywordTranslation.orm.yml b/config/doctrine/KeywordTranslation.orm.yml
new file mode 100644 (file)
index 0000000..18cf06e
--- /dev/null
@@ -0,0 +1,39 @@
+Rapsys\BlogBundle\Entity\KeywordTranslation:
+    type: entity
+    repositoryClass: Rapsys\BlogBundle\Repository\KeywordTranslationRepository
+    table: keywords_translations
+    id:
+        keyword_id:
+            type: integer
+            options:
+                unsigned: true
+        locale:
+            type: string
+            length: 5
+    fields:
+        description:
+            type: text
+            nullable: true
+        slug:
+            type: string
+            length: 128
+            nullable: true
+        title:
+            type: string
+            length: 128
+            nullable: true
+        created:
+            type: datetime
+        updated:
+            type: datetime
+    manyToOne:
+        keyword:
+            targetEntity: Rapsys\BlogBundle\Entity\Keyword
+            inversedBy: keyword_translations
+            joinColumn:
+                nullable: false
+    uniqueConstraints:
+        locale_slug:
+            columns: [ locale, slug ]
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']