title: Fabrication Gem difficult association
body: <p>I tried to use <a href="https://github.com/paulelliott/fabrication" rel="nofollow">Fabrication</a> gem in order to populate db in development in rails project.</p>
  
  <p>The problem is I do feel that Fabrication is very powerful instrument, however except for the simple association I cannot do anything else.</p>
  
  <p>For example, I have the following models</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :order, :dependent =&gt; :destroy
    has_many :src_reviews, :class_name =&gt; 'Review', :foreign_key =&gt; '...'
    has_many :dst_reviews, :class_name =&gt; 'Review', :foreign_key =&gt; '...'
  
  class Review &lt; ActiveRecord::Base
    belongs_to :src_user, :class_name =&gt; 'User', :foreign_key =&gt; '...' 
    belongs_to :dst_user,  :class_name =&gt; 'User', :foreign_key =&gt; '...'
  end
  
  class Order &lt; ActiveRecord::Base
    belongs_to :user
  </code></pre>
  
  <p>Not let consider different scenarious.</p>
  
  <p>I do know how to implement simple association from <strong>order</strong> to <strong>user</strong></p>
  
  <pre><code>Fabricator(:order) do   
    ...
    user { Fabricate(:user) }
  end
  
  Fabricator(:user) do
    ...
  end
  </code></pre>
  
  <p><strong>Q</strong>:However I have no idea whether I can do in opposite side.</p>
  
  <pre><code>Fabricator(:order) do   
    ...
  end
  
  Fabricator(:user) do
    orders {#somehow create 5 orders for each user}
  end
  </code></pre>
  
  <p>And the most difficult magic is how to fabricate <strong>Review</strong> with <strong>src_user</strong> and <strong>dst_user</strong> such that somehow to mix them up, preferable to have user that give a lot of reviews and the same user receive a lot of reviews.</p>
  
  <p>Thank you for helping.</p>