Skip to content

Instantly share code, notes, and snippets.

View joekarasek's full-sized avatar

Joseph Karasek joekarasek

View GitHub Profile
@Ocramius
Ocramius / User.php
Last active July 24, 2024 14:38
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
<!doctype html>
<html class="no-js" lang="en">
<head>
<title></title>
<meta name="description" content="">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Bootstrap: Latest compiled and minified CSS -->
<h1>Using <a href="http://emmet.io">Emmet</a></h1>
<!-- .template>h1.title+.body>p*3 -->
<div class="template">
<h1 class="title"></h1>
<div class="body">
<p></p>
<p></p>
<p></p>
</div>