users@glassfish.java.net

Re: ToplinkEssential's entityManager#merge + null _at_Version == Exception

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Wed, 14 Feb 2007 00:27:48 +0100

Aargh... yes, sure... Of course, my fault. I was so tired I couldn't
think correctly.
It's Optimistic Lock Exception that was thrown straight at my face all
the time when @Version annotated field was null.

Witek

2007/2/13, Gordon Yorke <gordon.yorke_at_oracle.com>:
> Are you getting a Concurrent Modification exception or an Optimistic
> Lock exception? If you are getting a concurrent modification exception
> it sounds like you may be modifying the object passed to the merge
> operation in a separate thread. Can you provide the stack trace.
> --Gordon
>
> Witold Szczerba wrote:
> > Hello there,
> > as I can see in my project, entityManager throws Concurrent
> > modification exception when I am using merge on non-existing entity
> > when it's @Version field is null.
> > I read that #merge should act pretty like the same as #persist when
> > given entity doesn't exist and ToplinkEssentials implementation does
> > not work that way.
> > Is that correct behavior?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>