hello all
I'm using hbm2java task (hibernate tools 3.2 beta 6a) task generate my java pojos from the hibernate mapping files.
I have 2 directories with hibernate mapping files, because i have two projects which are connected in Eclipse IDE.
Some hibernate mapping files in my Project refer to classes from the other project. In the file below the mapping file for class najsre7.model.Angebot refers for example to najs.model.Verband from the other project.
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 auto-import="false" >
<class name="najsre7.model.Angebot" table="TANGEBOT">
<id name="id" type="java.lang.Integer">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="ILAUFNUMMER" precision="9" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_TANGEBOT</param>
</generator>
</id>
<timestamp name="mutDatum" column="DMUTDAT" />
<many-to-one name="organisation" class="najs.model.Organisation" lazy="false" fetch="join" >
<column name="FK_TORG_ILAUFNR" precision="9" scale="0" not-null="true" />
</many-to-one>
<many-to-one name="verband" class="najs.model.Verband" lazy="false" fetch="join" >
<column name="FK_TVRB_ILAUFNR" precision="9" scale="0" />
</many-to-one>
<many-to-one name="angebotsArt" class="najsre7.model.AngebotArt" fetch="join" >
<column name="FK_TAART_ILAUFNR" precision="9" scale="0" />
</many-to-one>
</class>
</hibernate-mapping>
How can i start the task, without getting errors?!
Code:
[hibernatetool] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.MappingException: An association from the table TANGEBOT refers to an unmapped class: najs.model.Verband
Is there a way to refer the classpath to the other project as well?
kind regards
Angela