Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @entity
- **/
- class EntitaJedna{
- ... ID sloupec ...
- /**
- * @ManyToMany(targetEntity="EntitaDve")
- * @JoinTable(name="tabulka_pro_spojeni_entit",
- * joinColumns={@JoinColumn(name="jedna_id", referencedColumnName="id")},
- * inverseJoinColumns={@JoinColumn(name="dve_id", referencedColumnName="id")}
- * )
- */
- private $entityDve;
- }
- /**
- * @entity
- **/
- class EntitaDve{
- ... ID sloupec ...
- /**
- * @ManyToMany(targetEntity="EntitaJedna")
- * @JoinTable(name="tabulka_pro_spojeni_entit",
- * joinColumns={@JoinColumn(name="dve_id", referencedColumnName="id")},
- * inverseJoinColumns={@JoinColumn(name="jedna_id", referencedColumnName="id")}
- * )
- */
- private $entityJedna;
- }
- Při updatu schemat pokud mam obě asociace, u jedné to nedělá: The table with name 'tabulka_pro_spojeni_entit' already exists.
- // Tohle je pouze příklad ;)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement