title: Composite key in XML hibernate with second table
body: <p>Firstly, I have no control over the technology or database structure.</p>
  
  <p>I have an object that has another object as it's composite key.  Inside that composite id object, I have a column which I need to use to get ANOTHER value, specifically a description.  I'd like to be able to retrieve the description which is tied to this key when I pull the object.  Here is what I currently have (names changed to protect the innocent):</p>
  
  <pre><code>  &lt;class name="BusinessRuleObject" table="BUSINESS_RULE_OBJECTS" schema="DB"&gt;
      &lt;composite-id name="businessRuleObjectId" class="BusinessRuleObjectId"&gt;
        &lt;key-property name="idCode" column="ID_CD" /&gt;
        &lt;key-many-to-one name="businessRule" class="BusinessRule" column="BUSINESS_RULE" /&gt;
      &lt;/composite-id&gt;
      &lt;property name="updateDate" column="UPDATE_DT" type="timestamp" /&gt;
      &lt;property name="updateUser" column="UPDATE_USER_ID" /&gt;
    &lt;/class&gt;
  
    &lt;class name="BusinessRule" table="BUSINESS_RULE_LOOKUP" schema="DB"&gt;
      &lt;id name="businessRuleCode" column="BUSINESS_RULE"&gt;&lt;/id&gt;
      &lt;property name="description" column="DESCRIPTION_TX" /&gt;
      &lt;property name="updateDate" column="UPDATE_DT" type="timestamp" /&gt;
      &lt;property name="updateUser" column="UPDATE_USER_ID" /&gt;
    &lt;/class&gt;
  </code></pre>
  
  <p>What I'm trying to do here:</p>
  
  <ul>
  <li>Get "BusinessRuleObject"</li>
  <li>Be able to call something like BusinessRuleObject.businessRule.description</li>
  </ul>
  
  <p>In case it wasn't clear, the first table (objects) has two keys, an idCode and businessRule.  The second has one key, businessRule.</p>
  
  <p>Thanks for your help, seems like a simple issue, just can't wrap my head around it right now.</p>