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
|