Here is the hbm.xml file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.dao.Security" table="security">
<composite-id name="id" class="com.dao.SecurityKey">
<key-property name="user" column="user"/>
<key-property name="attorney" column="att"/>
</composite-id>
<property name="upid" column="@@upid"/>
</class>
</hibernate-mapping>
Security security = (Security) Session.get(Security.class, new SecurityKey("user", "att"));