saving detached child entities

0 views
Skip to first unread message

joniba

unread,
Aug 11, 2009, 9:02:34 AM8/11/09
to nhusers
Does anyone know if it's possible with NHibernate to save a transient
child entity, which in the database must be mapped with its parent's
ID, but in the model is not aware of its parent?

It is a 1:* relationship between the parent and children, where in the
model the parent contains a collection of the children, but the
children do not know who their parent is.

We are working detached, so that a session is opened separately for
each read or write operation.

I don't want to call an Update on the parent entity, because, being
detached, it will delete and resave all its child entities (of which
there may be very many).

Thanks ahead for any help
Reply all
Reply to author
Forward
0 new messages