-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: No persister for: java.lang.Integer
PostPosted: Mon Jul 26, 2004 8:45 am 
Newbie

Joined: Mon Jul 26, 2004 8:35 am
Posts: 2
I have defined the following mapping:

<?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
package="com.libertyit.bmit.cco.jaxb.impl">

<class name="AccountImpl" table="account">
<id name="stakeholderID" column="StakeholderID" type="int" unsaved-value="any">
<generator class="assigned"/>
</id>
<property name="accountNumber" column="AccountNumber" type="string" length="255"/>
....
....
<component name="address" class="com.libertyit.bmit.cco.jaxb.impl.AddressImpl">
<many-to-one name="addressID" class="com.libertyit.bmit.cco.jaxb.impl.AddressImpl" column="AddressID" unique="true"/>
</component>
</class>

</hibernate-mapping>

The AccountImpl object contains a method named getAddress().

The AddressImpl object contains a method named getAddressID().

Each account has one address and each address can belong to one or more accounts.

My mapping for the AddressImpl object is as follows:

<?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
package="com.libertyit.bmit.cco.jaxb.impl">

<class name="AddressImpl" table="address">
<id name="addressID" column="AddressID" type="int" unsaved-value="any">
<generator class="native"/>
</id>
<property name="attnOf" column="AttnOf" type="string" length="255"/>
....
....
</class>

</hibernate-mapping>

I generated my database schema using the mapping classes shown above. I have a test script which attempts to save the AccountImpl object and consequently, tries to save the AddressImpl object. However, I am getting the following Exception:

net.sf.hibernate.MappingException: No persister for: java.lang.Integer

Any ideas as to why this is happening.

Thanks,
Simon.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2004 9:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Read the instructions for using the user forum, and do not post again unless you are prepared to provide sufficient information including full stack traces.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 26, 2004 9:54 am 
Newbie

Joined: Mon Jul 26, 2004 8:35 am
Posts: 2
Apologies. I will read the notes and resubmit...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.