Do you mean something like this
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="de.laliluna.example">
<class name="book" table="book">
<composite-id>
<key-property name="id" />
<key-many-to-one name="customer" column="customer_fk" class="customer" />
</composite-id>
<property name="title" column="title" type="java.lang.String" />
<property name="author" column="author" type="java.lang.String" />
<property name="available" column="available"/>
</class>
<class name="customer" table="customer">
<id name="id">
<generator class="increment"/>
</id>
<bag name="books" inverse="false">
<key column="customer_fk" />
<one-to-many class="book"/>
</bag>
<property name="name" column="name"/>
<property name="lastname" column="lastname"/>
<property name="age" column="age" />
</class>
</hibernate-mapping>
In this mapping file i have two tables.