APAR status
Closed as program error.
Error description
Update by query fails when an entity is using Timestamped version field
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server V6.1.0 Feature Pack * * for Enterprise JavaBeans 3.0 who make use * * of a Java Persistence API (JPA) version * * field of Timestamp type. * **************************************************************** * PROBLEM DESCRIPTION: An update query of a JPA Version * * field of type Timestamp may fail. * **************************************************************** * RECOMMENDATION: * **************************************************************** Take the following JPA Entity definition: @Entity public class TimestampedEntity { @Id @GeneratedValue private long id; private String name; @Version private Timestamp version; Per the example, a version (@Version) field is defined with a type of Timestamp. When this entity is updated, the update may fail. For example, the following update query will fail: String jpql = "UPDATE TimestampedEntity t SET t.name=:newname WHERE t.name=:oldname"; em.createQuery(jpql).setParameter("newname", "Updated") .setParameter("oldname", "Original").executeUpdate();
Problem conclusion
With this fix, code has been added to OpenJPA to ensure that a Timestamp version field is properly handled when an attempt is made to update the corresponding entity. The fix for this APAR is currently targeted for inclusion in Enterprise JavaBeans 3.0 Feature Pack Fix Pack 6.1.0.47 of WebSphere Application Server version 6.1.0. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM73302
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-09-19
Closed date
2013-01-08
Last modified date
2013-01-08
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WAS EJB3 FEATUR
Fixed component ID
5724J0851
Applicable component levels
R610 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
10 February 2022