Resources/config/doctrine/DocumentTag.orm.yml
author ymh <ymh.work@gmail.com>
Mon, 24 Mar 2014 09:33:14 +0100
changeset 121 3510cf636720
parent 74 901463f9b11c
permissions -rwxr-xr-x
correct xml

##
# This file is part of the WikiTagBundle package.
#
# (c) IRI <http://www.iri.centrepompidou.fr/>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
##

IRI\Bundle\WikiTagBundle\Entity\DocumentTag:
  type: entity
  repositoryClass: IRI\Bundle\WikiTagBundle\Entity\DocumentTagRepository
  table: wikitag_document_tag
  fields:
    id:
      type: integer
      id: true
      generator:
        strategy: AUTO
    originalOrder:
      type: integer
      column: original_order
    tagOrder:
      type: integer
      column: tag_order
    indexNote:
      type: float
      column: index_note
    wikipediaRevisionId:
      type: bigint
      column: wikipedia_revision_id
      nullable: true
    createdAt:
      type: datetime
      column: created_at
      nullable: false      
  manyToOne:
    tag:
      targetEntity: Tag
      inversedBy: documents
      joinColumn:
        name: tag_id
        referencedColumnName: id
        nullable: false
        onDelete: cascade
    document:
      targetEntity: Document
      inversedBy: tags
      cascade: ["detach"]
      joinColumn: 
        name: document_id
        referencedColumnName: id
        nullable: false
  lifecycleCallbacks: {  }