On Tue, Dec 6, 2011 at 8:37 PM, chetan chaphekar <[email protected]>wrote:

> ...
> Now my question is how can i change the sequence, i want nhibernate to
> fire delete statement first and then insert.
> ...
>


I'd rather see the mapping and code that lead to such behavior.






On Tue, Dec 6, 2011 at 8:37 PM, chetan chaphekar <[email protected]>wrote:

> Hi,
>
> I have two objects Client & Contact Person. Client object has collection
> of contact persons. When Client object is saved in update mode, it throws
> an error message ' Unique Key Violation',
> Contact Person has a field CPCode which has Unique key constraint in Ms
> Sql. When i traced through sql profiler, I came to know that nhibernate
> fires Insert Statements first and then delete statements, because of this
> sql throws  ' Unique Key Violation' error.
>
> Now my question is how can i change the sequence, i want nhibernate to
> fire delete statement first and then insert.
>
> Please help
>
> Regards
> Chetan Chaphekar
>
> --
> 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.
>



-- 
Regards,

Maximilian Haru Raditya

-- 
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