-->
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: Order of inserts/updates?
PostPosted: Sun Jul 02, 2006 7:01 pm 
Regular
Regular

Joined: Tue May 31, 2005 3:18 pm
Posts: 117
Location: Houston
Is there a way of forcing NHibernate to do inserts/updates on certain relationships first? Like some sort of priority?

Say I have a mapping for object Foo like this:

<class name="Foo">
<id> ... </id>

<bag name="bar"> ... </bag>
<bag name="meh"> ... </bag>

</class>

Now say there is a legacy schema in place that has a foreign key where FooMeh depends on the key in FooBar, not foo. So in this example, an insert to Meh would depend on an insert to Bar before-hand.

There is no logical way that I can change my mappings to reflect the foreign key (that I can think of). I figured Nhib would issue the insert on Bar first since it's first in the mapping file, but that's not the case.

I'm using NHibernate 1.0.2

_________________
------------------------------
Ben Scheirman
http://www.flux88.com


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.