[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [eclipselink-users] @Version checking when reading entity?
|
- From: James Sutherland <jamesssss@xxxxxxxxx>
- Date: Wed, 19 Aug 2009 07:28:53 -0700 (PDT)
- Delivered-to: eclipselink-users@eclipse.org
Probably not worth it, as optimistic locking is normally optimistic.
If you really wanted to, you could do a select on the version and check it
("Select o.version from MyObject o where o.id = :id"), or even just refresh
the object.
cl333r wrote:
>
> Folks, is it worth checking the @Version field before trying to update an
> in-memory entity from the database table?
> If so, can you please share a link or example how this is usually done?
>
> Using JPA, EclipseLink & MySQL 5.
>
-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/%40Version-checking-when-reading-entity--tp24856609p25045216.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.