-->
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.  [ 1 post ] 
Author Message
 Post subject: Mapping association issue -
PostPosted: Tue Apr 05, 2005 6:44 am 
Newbie

Joined: Thu Feb 17, 2005 7:54 am
Posts: 3
I am having a problem trying to create a valid mapping between two objects in my application.

My object, Account, has a current status of type LimitStatus, as well as a set of all the previous status's. I have tried to map this relationship however hibernate seems to freeze on startup. I have tried a number of different options but nothing seems to work. Additionally I have been asked not to use interceptor, so the History interceptor is not a valid option.

I would appreciate any help with this.

Hibernate version: 2.1.2

Mapping documents:

<class name="Account" lazy="true" dynamic-update="true">
<id name="id">
<generator class="native"/>
</id>
<version name="version"/>
<property name="accountCode">
<column name="accountCode" unique="true" length="15" not-null="true"/>
</property>
<property name="description" length="50"/>
<many-to-one name="currentStatus" class="LimitStatus" column="currentStatusId" cascade="none"/>
<set name="statusHistory" cascade="none" lazy="true" batch-size="10">
<key foreign-key="fk_account_limit" column="accountId"/>
<one-to-many class="LimitStatus"/>
</set>
</class>

<class name="LimitStatus" lazy ="true" dynamic-update="true">
<id name="id">
<generator class="native"/>
</id>
<version name="version"/>
<set name="assessedLimits" cascade="save-update" lazy="true" batch-size="10">
<key foreign-key="fk_status_limit" column="StatusId"/>
<one-to-many class="AssessedLimit"/>
</set>
</class>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
n/a
system hangs after Not binding factory to JNDI, no JNDI name configured

Name and version of the database you are using:
Ms SQL Server 2000

The generated SQL (show_sql=true):
does not get that far

Debug level Hibernate log excerpt:


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

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.