Skip to content

Instantly share code, notes, and snippets.

@HongKilDong
Created December 27, 2021 08:58
Show Gist options
  • Save HongKilDong/02490e9420dcc0506587c4ae0096180f to your computer and use it in GitHub Desktop.
Save HongKilDong/02490e9420dcc0506587c4ae0096180f to your computer and use it in GitHub Desktop.
Odiseo\BlogBundle\Model\Article:
type: mappedSuperclass
table: odiseo_blog_article
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
code:
type: string
unique: true
enabled:
type: boolean
createdAt:
type: datetime
column: created_at
gedmo:
timestampable:
on: create
updatedAt:
type: datetime
column: updated_at
nullable: true
gedmo:
timestampable:
on: update
archivedAt:
type: datetime
column: archived_at
nullable: true
manyToMany:
categories:
targetEntity: Odiseo\BlogBundle\Model\ArticleCategoryInterface
inversedBy: articles
joinTable:
name: odiseo_blog_articles_categories
joinColumns:
article_id:
referencedColumnName: id
inverseJoinColumns:
category_id:
referencedColumnName: id
oneToMany:
images:
targetEntity: Odiseo\BlogBundle\Model\ArticleImageInterface
mappedBy: owner
cascade: [ALL]
comments:
targetEntity: Odiseo\BlogBundle\Model\ArticleCommentInterface
mappedBy: article
cascade: [ALL]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment