I have certainly missed something. I have cut and paste your mapping file :
Code:
<class name="Item" table="ITEM" >
<id name="ID" column="ID" type="long">
<generator class="sequence">
<param name="sequence">SEQ_ID_ETA</param>
</generator>
</id>
<property name="libelle" column="libelle" type="string" />
<many-to-one name="itemDetail" column="FK_ITEM_DETAIL_ID" not-null="false"/>
</class>
<class name="ItemDetail" table="ITEM_DETAIL" >
<id name="ID" column="ID" type="long">
<generator class="sequence">
<param name="sequence">SEQ_ID_ETA</param>
</generator>
</id>
<property name="detail" column="detail" type="string" />
</class>
Here is my POJO :
Code:
public class Item {
Long ID;
String libelle;
ItemDetail itemDetail ;
// With all getter and setters
ItemDetail get/setItemDetail()
}
public class ItemDetail {
Long ID;
String detail;
// With all getters and setters
}
Here is the error which is normal, itemDetail is not mapped with a Foreign key in Item class but in ItemDetail class...
[HibernateUtil] closeSession()
<25 2004 15 h 02 CEST> <Error> <HTTP> <BEA-101017> <[ServletContext(id=34547968,name=webapp,context-path=/webap
Root cause of ServletException.
net.sf.hibernate.HibernateException: unmapped property: itemDetail
at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValue(Ljava.lang.Object;Ljava.lang.String;)
Does I missed something ?[/code]