title: Doctrine 2 can't use nullable=false in manyToOne relation?
body: <p>An <code>User</code> has one <code>Package</code> associated with it. Many users can refer to the same package. <code>User</code> cannot exists without a <code>Package</code> defined. <code>User</code> should own the relation. Relation is bidirectional, so a <code>Package</code> has zero or more users in it.</p>
  <p>These requirements lead to <code>ManyToOne</code> relation for <code>User</code> and <code>OneToMany</code> relation of <code>Package</code> in Doctrine 2. However <code>package_id</code> in <code>user</code> table (that is foreign-key) allows <code>null</code> values. I've tried setting <code>nullable=false</code> but command:</p>
  <pre><code> php app/console doctrine:generate:entities DL --path=&quot;src&quot; --no-backup
  </code></pre>
  <p>Says that there is no attribute <code>nullable</code> for the relation <code>ManyToOne</code>. <strong>What i'm missing?</strong></p>
  <pre><code>class User
  {
  
      /**
       * @ORM\Id
       * @ORM\Column(type=&quot;integer&quot;)
       * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;)
       */
      private $id;
  
      /**
       * @ORM\ManyToOne(targetEntity=&quot;Package&quot;, inversedBy=&quot;users&quot;)
       */
      private $package;
  
  }
  
  class Package
  {
  
      /**
       * @ORM\Id
       * @ORM\Column(type=&quot;integer&quot;)
       * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;)
       */
      private $id;
  
      /**
       * @ORM\OneToMany(targetEntity=&quot;User&quot;, mappedBy=&quot;package&quot;)
       */
      private $users;
  
  }
  </code></pre>