<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>

	<class name="org.hibernate.envers.test.integration.entityNames.manyToManyAudited.Person"
		entity-name="Personaje">

		<id name="id" column="ID_PERSON" type="long">
			<generator class="native" />
		</id>

		<property name="name" type="string" length="255" column="NAME"
			not-null="true" />

		<property name="age" type="int" column="AGE" />

		<bag name="cars" inverse="true" table="PERSON_CAR" >
			<key column="ID_CAR" />
			<many-to-many
				class="org.hibernate.envers.test.integration.entityNames.manyToManyAudited.Car" column="ID_PERSON"/>
		</bag>

	</class>

	<class name="org.hibernate.envers.test.integration.entityNames.manyToManyAudited.Car">

		<id name="id" column="ID_CAR" type="long">
			<generator class="native" />
		</id>

		<property name="number" type="int" not-null="true" />

		<bag name="owners" cascade="all" table="PERSON_CAR" >
			<key column="ID_PERSON" />
			<many-to-many entity-name="Personaje" column="ID_CAR"/>
		</bag>

	</class>

</hibernate-mapping>
