Symfony
- 24 ответа
- 0 вопросов
11
Вклад в тег
BlogBundle\Entity\Blog:
type: entity
table: bb_blog
repositoryClass: BlogBundle\Entity\Repository\BlogRepository
fields:
name:
type: string
length: 100
nullable: false
status:
type: string
length: 10
nullable: false
manyToOne:
user:
targetEntity: BlogBundle\Entity\User
joinColumn:
name: user_id
referencedColumnName: id
oneToMany:
posts:
targetEntity: BlogBundle\Entity\Post
mappedBy: blog
orderBy: { 'createdAt': 'ASC' }
cascade:
- remove