Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]DoctrineMigrationsBundle. Dlaczego komenda doctrine:migration:diff nie pokazuje zmian
Forum PHP.pl > Forum > Przedszkole
porzeczki
Nie mam doświadczenia większego z DoctrineMigrationBundle. Dodałem encję w symfony a komenda doctrine:migration:diff mówi że nie ma zmian. Jakie mogą być przyczyny?

  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7.  
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\Table(name="document_category")
  11.  */
  12. class DocumentCategory
  13. {
  14. /**
  15.   * @ORM\Id
  16.   * @ORM\GeneratedValue(strategy="AUTO")
  17.   * @ORM\Column(type="integer")
  18.   */
  19. private $id;
  20.  
  21. /**
  22.   * @ORM\Column(type="integer")
  23.   */
  24. private $parent_id;
  25.  
  26. /**
  27.   * @ORM\Column(type="string")
  28.   */
  29. private $name;
  30.  
  31. /**
  32.   * @ORM\OneToMany(targetEntity="AppBundle\Entity\Documents", mappedBy="category")
  33.   */
  34. private $Documents;
  35.  
  36. /**
  37.   * @return mixed
  38.   */
  39. public function getId()
  40. {
  41. return $this->id;
  42. }
  43.  
  44. /**
  45.   * @return mixed
  46.   */
  47. public function getParentId()
  48. {
  49. return $this->parent_id;
  50. }
  51.  
  52. /**
  53.   * @param mixed $parent_id
  54.   */
  55. public function setParentId($parent_id)
  56. {
  57. $this->parent_id = $parent_id;
  58. }
  59.  
  60. /**
  61.   * @return mixed
  62.   */
  63. public function getName()
  64. {
  65. return $this->name;
  66. }
  67.  
  68. /**
  69.   * @param mixed $name
  70.   */
  71. public function setName($name)
  72. {
  73. $this->name = $name;
  74. }
  75.  
  76. /**
  77.   * @return ArrayCollection|IntraDocuments[]
  78.   */
  79. public function getIntraDocuments()
  80. {
  81. return $this->intraDocuments;
  82. }
  83.  
  84. public function __construct()
  85. {
  86. $this->intraDocuments = new ArrayCollection();
  87. }
  88. }
kufel16
Zmiany masz już w bazie danych?
porzeczki
Baza istnieje. Encja jest nowa.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.