I'm seeing this error sometimes (it's intermittent):

Cannot add or update a child row: a foreign key constraint fails


My code is like that:

SaveOrUpdate(parent)

(...)

SaveOrUpdate(child)


The errors means that I'm trying to insert a Child that refers to a
Parent that doesn't exist yet. It claims because the Parent already
has ID, it already passed by SaveOrUpdate, but NH didn't persisted
that yet.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to