hi,
hibernate want to create a constraint which exists soon in the database.
how can I tell hibernate , to use the existing constraint?
BasisModell and land have here a n:m relation in the table BASISMODELL_LAND
here my error message:
ERROR - Unsuccessful: alter table BASISMODELL_LAND add constraint FK7DE96F69205D3619 foreign key (BASISMODELL_ID) references BASISMODELL
ERROR - ORA-02275:such a referential constraint already exists in the table
here the BASISMODELL hbn.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="XX.xx.XX
" table="BASISMODELL">
<id name="id" column="ID" type="string">
<generator class="assigned">
</generator>
</id>
<many-to-one name="fahrzeugKlasse" column="FZGKLASSE_ID" class="de.xx.xx.FahrzeugKlasse"/>
<many-to-one name="fahrzeugTyp" column="FZGTYP_ID" class="de.xx.xx.FahrzeugTyp"/>
<set name="laender" table="BASISMODELL_LAND">
<key column="BASISMODELL_ID"/>
<many-to-many column="ID_LAND" class="de.xx.xx.Land"/>
</set>
<property name="bezeichnung" column="BASISMODELL_BEZ"/>
<property name="hersteller" column="HERSTELLER"/>
<property name="karrosserie" column="KARROSSERIE"/>
<property name="triebsatz" column="TRIEBSATZ"/>
<property name="giltVon" column="GILTVON"/>
<property name="giltBis" column="GILTBIS"/>
<property name="us" column="US"/>
<property name="ts" column="TS"/>
</class>
</hibernate-mapping>
|