title: Symfony 2 FOSUserBundle Relation to Products Table
body: <p>I apologize in advance if this has been asked before.</p>
  
  <p>I have successfully setup FOSUserBundle.</p>
  
  <p>I am trying to setup "<a href="http://symfony.com/doc/current/book/doctrine.html" rel="nofollow">http://symfony.com/doc/current/book/doctrine.html</a>" the product example from that link out of the documentation. </p>
  
  <p>What I would like to do is set it up so a specific user adds a product the User Id of the FOSUser that user is associated with that product.</p>
  
  <p>I have two bundles in the Acme folder</p>
  
  <p>Acme/UserBundle -> the FOSUser Setup</p>
  
  <p>and</p>
  
  <p>Acme/MainBundle -> where I am setting up products.  </p>
  
  <p>I've gone over the relationship documents a few time and I am not quite clear on them in Symfony2.</p>
  
  <p>I think it is a OneToMany relationship in the User Entity based on a "user_id" in the Products table but i'm not a 100% sure how to do it.</p>
  
  <p>Does anyone know a tutorial or even a basic idea on if I am going in the right direction on this? Thanks very much and I will obviously publish the successful results Once I get there. </p>