title: Using Hibernate Get with Multi-Column Primary Key
body: <p>Say I have a class that looks like this:</p>
  
  <pre><code>public class MyClass {
    @Id
    @Column(name = "ID")
    private long Id;
  }
  </code></pre>
  
  <p>I can use a hibernate session to do a get or load on the class like this:</p>
  
  <pre><code>MyClass a = (MyClass)session.get(MyClass.class, new Long(100));
  </code></pre>
  
  <p>However, assume I have a class with multiple columns as the primary key:</p>
  
  <pre><code>public MyJoinClass implements Serializable {
    private static final long serialVersionUID = -5L;
    @Id
    @Column(name = "ID")
    private long id;
  
    @Id
    @Column(name = "EMAIL_ADDRESS_ID")
    private long emailAddressId;
  }
  </code></pre>
  
  <p>Is it possible to use get or load with such a class?</p>