title: fluent nhibernate circular reference pain
body: <p>I have 2 objects in my domain A, and B</p>
  
  <p>Object A has a property of B
  Object B has a property of list</p>
  
  <p>when I do a hit on my db, of B, it returns a list of As, but each A has a B, which in turn has a list of As. over and over and over.</p>
  
  <p>clearly a lazy loading issue. Lazy loading is on, but my problem is that this is a WCF service, do i need to convert all my domain objects into dto objects to send down the wire and when i do it does the following - pseudocode</p>
  
  <pre><code>ADTO adto Transform(ADomain a)
  {
     adto.name = a.name;
     adto.surname = a.surname;
     adto.B = Transform(a.B);
  }
  
  BDTO bdto Transform(BDomain b)
  {
     bdto.bob = b.bob;
     foreach (A a in b.As)
     {
         bdto.bs.add(Transform(a));
     }
  }
  </code></pre>
  
  <p>so how can i make my fetch of the collection only go one layer deep.</p>
  
  <p>B's mapping:</p>
  
  <pre><code>HasMany(x =&gt; x.As)
              .Cascade.AllDeleteOrphan()
              .Fetch.Select()
              .Inverse().KeyColumn("AId");
  </code></pre>
  
  <p>A's mapping:</p>
  
  <pre><code> References(x =&gt; x.B).Column("AId");
  </code></pre>