-->
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.  [ 2 posts ] 
Author Message
 Post subject: Many-to-one with formula and not-found
PostPosted: Thu Oct 18, 2007 7:18 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.2.2
Mapping documents:
<hibernate-mapping package="myproject.test">
<class name="Posting" table="POSTING">
<many-to-one name="jobOpening" column="JOBOPENING_ID" insert="true" update="true" class="myproject.test.JobOpening" not-null="false">
</many-to-one>
<many-to-one name="requisition" class="myproject.test.Requisition" insert="false" update="false" formula="jobOpening_id" not-found="ignore">
</many-to-one>
<many-to-one name="position" class="myproject.test.Position" insert="false" update="false" formula="jobOpening_id" not-found="ignore">
</many-to-one>
</class>
</hibernate-mapping>


Requisition and Position are joined subclasses of JobOpening. My expectation with this mapping is that depending on the value of jobopening_id column posting table either requisition or position property will get populated in posting object and other one will be null.

But thats not the case, I am getting this exception
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [myproject.text.Position#160673]

while trying to load an posting object in which jobOpening refers to a requisition.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 10:12 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
Any suggestions???


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.