--- /dev/null
+Rapsys\BlogBundle\Entity\Group:
+ type: entity
+ #repositoryClass: Rapsys\BlogBundle\Repository\GroupRepository
+ table: groups
+ manyToMany:
+ users:
+ targetEntity: Rapsys\BlogBundle\Entity\User
+ mappedBy: groups
--- /dev/null
+Rapsys\BlogBundle\Entity\User:
+ type: entity
+ repositoryClass: Rapsys\BlogBundle\Repository\UserRepository
+ table: users
+ fields:
+ pseudonym:
+ type: string
+ length: 64
+ nullable: true
+ slug:
+ type: string
+ length: 64
+ unique: true
+ nullable: true
+ oneToMany:
+ articles:
+ targetEntity: Rapsys\BlogBundle\Entity\Article
+ mappedBy: user
+ user_translations:
+ targetEntity: Rapsys\BlogBundle\Entity\UserTranslation
+ mappedBy: user
+# manyToMany:
+# groups:
+# targetEntity: Group
+# inversedBy: users
+# joinTable:
+# name: users_groups
+ associationOverride:
+ groups:
+ joinTable:
+ name: users_groups
+ joinColumns:
+ id:
+ name: user_id
+ inverseJoinColumns:
+ id:
+ name: group_id
--- /dev/null
+Rapsys\BlogBundle\Entity\UserTranslation:
+ type: entity
+ #repositoryClass: Rapsys\BlogBundle\Repository\UserTranslationRepository
+ table: users_translations
+ id:
+ user_id:
+ type: integer
+ options:
+ unsigned: true
+ locale:
+ type: string
+ length: 5
+ fields:
+ description:
+ type: text
+ nullable: true
+ created:
+ type: datetime
+ updated:
+ type: datetime
+ manyToOne:
+ user:
+ targetEntity: Rapsys\BlogBundle\Entity\User
+ inversedBy: user_translations
+ joinColumn:
+ nullable: false
+ lifecycleCallbacks:
+ preUpdate: ['preUpdate']