]> Raphaël G. Git Repositories - blogbundle/commitdiff
Fix indentation
authorRaphaël Gertz <git@rapsys.eu>
Fri, 10 Nov 2023 12:24:40 +0000 (13:24 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Fri, 10 Nov 2023 12:24:40 +0000 (13:24 +0100)
Fix relations
Add preUpdate callback

Resources/config/doctrine/Article.orm.yml

index bb32b8490593a6b3e09a229e2ef0b051504bbe1a..6efd871278304c65c7e94dd408b621a0d89aea1c 100644 (file)
@@ -1,33 +1,32 @@
 Rapsys\BlogBundle\Entity\Article:
-        type: entity
-        repositoryClass: Rapsys\BlogBundle\Repository\ArticleRepository
-        table: articles
+    type: entity
+    repositoryClass: Rapsys\BlogBundle\Repository\ArticleRepository
+    table: articles
+    id:
         id:
-                id:
-                        type: integer
-                        generator: 
-                                strategy: AUTO
-                        options:
-                                unsigned: true
-        fields:
-                created:
-                        type: datetime
-                updated:
-                        type: datetime
-        manyToOne:
-                site:
-                        targetEntity: Rapsys\BlogBundle\Entity\Site
-                        inversedBy: articles
-                author:
-                        targetEntity: Rapsys\BlogBundle\Entity\Author
-                        inversedBy: articles
-        manyToMany:
-                keywords:
-                        targetEntity: Rapsys\BlogBundle\Entity\Keyword
-                        inversedBy: articles
-                        joinTable:
-                                name: articles_keywords
-        oneToMany:
-                article_translations:
-                        targetEntity: Rapsys\BlogBundle\Entity\ArticleTranslation
-                        mappedBy: article
+            type: integer
+            generator:
+                strategy: AUTO
+            options:
+                unsigned: true
+    fields:
+        created:
+            type: datetime
+        updated:
+            type: datetime
+    manyToOne:
+        user:
+            targetEntity: Rapsys\BlogBundle\Entity\User
+            inversedBy: articles
+    manyToMany:
+        keywords:
+            targetEntity: Rapsys\BlogBundle\Entity\Keyword
+            inversedBy: articles
+            joinTable:
+                name: articles_keywords
+    oneToMany:
+        article_translations:
+            targetEntity: Rapsys\BlogBundle\Entity\ArticleTranslation
+            mappedBy: article
+    lifecycleCallbacks:
+        preUpdate: ['preUpdate']