title: Are there occasions when NHibernate won't return a proxy object?
body: <p>I'm learning Fluent NHibernate (and by extension, NHibernate generally). I'm using auto-mapping with some overrides, but I don't think that is important for the question (of course, if I'm wrong here I'll gladly update the question).</p>
  
  <p>Given an <code>ISession</code> (and a few more assumed variables) I can return entities by their ID:</p>
  
  <pre><code>using (var session = SessionFactory.OpenSession())
  {
      var user = session.Get&lt;User&gt;(userId);
  }
  </code></pre>
  
  <p>My limited understanding was that NHibernate creates a proxy around the <code>User</code> mapped entity, yet when I test it (<a href="http://www.google.co.uk/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCsQFjAA&amp;url=https://stackoverflow.com/questions/2664245/identifying-nhibernate-proxy-classes&amp;ei=IqtsT7HXConD0QX2mKnEBg&amp;usg=AFQjCNFcxXFnRmxfJ4wuxvVO1Cqt3y8pPw&amp;sig2=aFy6oYiaPeMOQD6cXwqWAg" rel="nofollow noreferrer">based on this</a>):</p>
  
  <pre><code>Assert.That(user is INHibernateProxy, "Not a proxy.");
  </code></pre>
  
  <p>It appears as though my instance is not a proxy.</p>
  
  <p><strong>Are there occasions where proxies are not used?</strong> I'm hoping for the "missing piece" and praying this isn't the Friday afternoon brain-fail.</p>