Skip to content

Instantly share code, notes, and snippets.

@icambridge
Created December 3, 2012 11:25
Show Gist options
  • Save icambridge/4194310 to your computer and use it in GitHub Desktop.
Save icambridge/4194310 to your computer and use it in GitHub Desktop.
<?php
class Invoice
{
/**
* @ORM\OneToMany(targetEntity="InvoiceLine", mappedBy="invoiceId")
*/
private $lines;
}
<?php
class InvoiceLine
{
/**
* @ORM\Column(type="integer", name="invoice_id")
* @ORM\ManyToOne(targetEntity="Invoice", inversedBy="id")
*/
private $invoiceId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment