| Author |
Problem with mapping
|
Alen Dao
Greenhorn
Joined: May 27, 2009
Posts: 1
|
|
Hello,
I have simple mapping I don't know why it doesn't work
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="mappings" default-access="field">
<class name="Product" table="PRODUCTS" >
<composite-id>
<key-many-to-one name="productId" column="PRODUCT_ID" class="mappings.Product" />
<key-many-to-one name="productAltId" column="PRODUCT_ALT_ID"/>
</composite-id>
</class>
</hibernate-mapping>
Exception:
org.hibernate.MappingException: An association from the table PRODUCTS refers to an unmapped class: java.lang.Integer
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
Perhaps somewhere in your class you are mapping to java.lang.Integer instead of simply declaring a property of type Integer in your code. Any chance?
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: Problem with mapping
|
|
|