title: How to map a myBatis result to multiple objects?
body: <p>Is it possible in myBatis 3 to map a single result to multiple objects, ensuring that the objects all reference the same instance? Is there an example of this I could reference?</p>
  
  <p><strong>Updated to add more detail:</strong></p>
  
  <p>For instance, let's say I store information regarding <code>Contact</code>s for my application in my DB. I want to know if it's possible to use myBatis to map the same instance of a contact to, say, a <code>Listing</code> class, which holds a <code>Contact</code>:</p>
  
  <pre><code>public class Listing {
      private Contact myContact;
      //getters &amp; setters...
  }
  </code></pre>
  
  <p>as well as to a <code>ContactsHolder</code> class, which also holds a <code>Contact</code>:</p>
  
  <pre><code>public class ContactsHolder {
      private Contact aContact
      //getters &amp; setters...
  }
  </code></pre>
  
  <p>I need the object that is mapped by myBatis to both the <code>Listing</code> and <code>ContactsHolder</code> classes to be the same instance. Is this possible?</p>