Advertisement
Guest User

Untitled

a guest
Oct 31st, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.44 KB | None | 0 0
  1. <?php
  2. use Doctrine\ORM\Mapping AS ORM;
  3. namespace Cabval\Entity;
  4.  
  5. /**
  6.  * @ORM\Entity
  7.  * @ORM\Table(name="definition_file")
  8.  */
  9. class DefinitionFile
  10. {
  11.   /**
  12.    * @ORM\Id
  13.    * @ORM\Column(type="integer", name="id")
  14.    * @ORM\GeneratedValue(strategy="IDENTITY")
  15.    */
  16.   private $id;
  17.  
  18.   /**
  19.    * @ORM\ManyToOne(targetEntity="Cabval\Entity\Product", inversedBy="definitionFiles")
  20.    * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  21.    */
  22.   private $product;
  23.  
  24.   /**
  25.    * @ORM\ManyToOne(targetEntity="Cabval\Entity\Product")
  26.    * @ORM\JoinColumn(name="product2_id", referencedColumnName="id")
  27.    */
  28.   private $product2;
  29.  
  30.   /**
  31.    * @ORM\ManyToMany(targetEntity="Cabval\Entity\SourcePath")
  32.    * @ORM\JoinTable(
  33.    *   name="definition_file_source_path",
  34.    *   joinColumns={@ORM\JoinColumn(name="definition_file_id", referencedColumnName="id", nullable=false)},
  35.    *   inverseJoinColumns={@ORM\JoinColumn(name="source_path_id", referencedColumnName="id", nullable=false)}
  36.    * )
  37.    */
  38.   private $sourcePaths;
  39. }<?php
  40. use Doctrine\ORM\Mapping AS ORM;
  41. namespace Cabval\Entity;
  42.  
  43. /**
  44.  * @ORM\Entity
  45.  * @ORM\Table(name="product")
  46.  */
  47. class Product
  48. {
  49.   /**
  50.    * @ORM\Id
  51.    * @ORM\Column(type="integer", name="id")
  52.    * @ORM\GeneratedValue(strategy="IDENTITY")
  53.    */
  54.   private $id;
  55.  
  56.   /**
  57.    * @ORM\OneToMany(targetEntity="Cabval\Entity\DefinitionFile", mappedBy="product")
  58.    */
  59.   private $definitionFiles;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement