Advertisement
Puzo

Doctrine inserting error - File categories.php

Nov 2nd, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. <?php
  2. namespace models;
  3.  
  4. /**
  5.  * @Entity
  6.  * @Table(name="categories")
  7.  */
  8. class Categories {
  9.     /**
  10.      * @Id
  11.      * @Column(name="id", type="integer", nullable=false)
  12.      * @GeneratedValue(strategy="AUTO")
  13.      */
  14.     protected $id;
  15.    
  16.     /**
  17.      * @ManyToOne(targetEntity="Languages")
  18.      */
  19.     protected $languages;
  20.    
  21.     /**
  22.      * @Column(type="integer", nullable=false)
  23.      */
  24.     protected $parent_id;
  25.    
  26.     /**
  27.      * @Column(type="string", length="255", nullable=false)
  28.      */
  29.     protected $title;
  30.  
  31.    
  32.     /* Setters & Getters */
  33.     public function getId(){ return $this->id; }
  34.    
  35.     public function setLanguage($id){ $this->languages = (int)$id; }
  36.     public function getLanguage(){ return $this->languages; }
  37.    
  38.     public function setParentId($parent){ $this->parent_id = $parent; }
  39.     public function getParentId(){ return $this->parent_id; }  
  40.    
  41.     public function setTitle($title){ $this->title = $title; }
  42.     public function getTitle(){ return $this->title; }
  43. }
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement