Skip to content

Instantly share code, notes, and snippets.

@florinutz
Created March 17, 2014 13:13
Show Gist options
  • Save florinutz/9598933 to your computer and use it in GitHub Desktop.
Save florinutz/9598933 to your computer and use it in GitHub Desktop.
In InvoicingClients:
/**
* @var ArrayCollection
*
* @ORM\ManyToMany(targetEntity="Customer", mappedBy="invoicingClients")
* @ORM\JoinTable(
* name="invoicing_clients_customers",
* joinColumns={@ORM\JoinColumn(name="client_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="customer_id", referencedColumnName="id")}
* )
*/
private $customers;
in Customer:
/**
* @var ArrayCollection
* @ORM\ManyToMany(targetEntity="InvoicingClient", mappedBy="customers")
*/
private $invoicingClients;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment