in SQL Server, there is a distinct difference between @@Identity and the
last_idnetity()It is possible that the same is true for MySQL ?

On Tue, Dec 9, 2008 at 3:46 PM, PB <[EMAIL PROTECTED]> wrote:

>
> Hey guys, first time here, I'm hoping you can help!
>
> Some info before I start.. we're running Castle/AR/NH (2.1.0) with a
> MySQL (v5 I believe) backend. We're also running with Session per
> request and FlushMode Never.
>
> We've been having some serious issues with FK's, in particular what
> looked like seemingly random values being inserted or just failing due
> to the FK constraints. After trawling some NH SQL logs It turns out
> that the values are from previous values of LAST_INSERT_ID().
>
> This doesnt always seem to be the Identifier returned from the last
> insert though, sometimes its a more than a few before - at least
> chronologically at least. I'm not sure if this could be a thread/
> connection issue?
>
> I know this isn't much information - I do have a couple of NH log
> files I've stripped down that show the issue though. Am I ok to paste
> them or should I upload them somewhere?
>
> Thanks in advance guys,
>
> Regards,
> Paul
>
> >
>

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