OK.  Wasn't sure if NHibernate had any facilities to handle this
without having to catch an exception.

On Sep 1, 12:42 pm, Jason Meckley <[email protected]> wrote:
> the uniqueness exists at the database level, therefore you need to go
> to the database to check.
>
> If you can generally assume the object is unique, then you could
> bypass the check, catch the unique constraint violation exception and
> ask the user to submit their request again.
>
> On Sep 1, 12:34 pm, Mike <[email protected]> wrote:
>
>
>
> > Hello,
> > Can somebody point me in the correct direction on how to handle unique
> > key constraint violations in NHibernate?  Is there a more optimized
> > way than simply querying the table before attempting the insert/
> > update?
>
> > Thanks!

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