Skip to content

Instantly share code, notes, and snippets.

@pensiero
Created October 4, 2013 15:11
Show Gist options
  • Save pensiero/6827565 to your computer and use it in GitHub Desktop.
Save pensiero/6827565 to your computer and use it in GitHub Desktop.
class Tile extends Entity {
/**
* @ORM\OneToOne(
* targetEntity="Domino\Entity\Tile",
* mappedBy="tileLeft",
* cascade={"persist", "merge"}
* )
* @var Tile
*/
protected $tileRight;
/**
* @ORM\OneToOne(
* targetEntity="Domino\Entity\Tile",
* inversedBy="tileRight"
* )
* @ORM\JoinColumn(
* name="tile_left_id",
* referencedColumnName="id",
* onDelete="CASCADE"
* )
* @var Tile
*/
protected $tileLeft;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment