Have you tried asking on the nhibernate
users<http://groups.google.com/group/nhusers/> mailing
list? Your question is more about NH usage than the FNH mappings.

On Tue, Sep 14, 2010 at 5:39 PM, Sujith <sujit...@gmail.com> wrote:

> Hi,
>
> I am getting errors when updating fields which has a unique key
> constraint.
> Actually, the collection is having the changed values and there is no
> duplication in the unique key fields.
>
> My records are as below
>
> Initially,
>
> A          B
> --          --
> 1           1
> 1           2
> 2           1
> 2           2
>
> Now i Update the above records as
>
> A          B           Changes
> --          --            A        B
> 1           1    =     1         2 - It Fails
> 1           2    =     1         3 - This updates correctly
> 2           1    =     2         2 - It Fails
> 2           2    =     2         3 - This updates correctly
>
> Am doing this with a Session.Persist and the Session.Flush.
> When i checked the query execution for this.
> I can see 4 update statements are executed, but it first executes the
> update statement of 1,1 to 1,2. But 1,2 already exists. So the update
> fails.
> Is there any way that we can order the execution of updates. So that
> 1,2 updates to 1,3 and then 1,1 updates to 1,2, which i feel should
> work.
>
> Any help is much appreciated.
>
> Regards
>
> Sujith
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to fluent-nhibern...@googlegroups.com.
> To unsubscribe from this group, send email to
> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to