Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Problems migrating from eclipselink 2.7.8 to 2.7.9(Problems with session customizers)
Problems migrating from eclipselink 2.7.8 to 2.7.9 [message #1847975] Mon, 15 November 2021 16:32 Go to next message
Eclipse UserFriend
Hi folks we've had code running on various versions of eclipse link up thru 2.7.8 that worked fine for using session customizers to inject fields as part of transactions. In 2.7.9 something seems to have broken. Was there any changes around this area that i can look into?

We do (roughly):

ReturningPolicy rp = new ReturningPolicy();
rp.addFieldForInsertReturnOnly(table + "." + JPAEntityUtils.getPhysicalColumnName(doClz, Updateable.CREATE_DATE), Date.class);
rp.addFieldForInsertReturnOnly(table + "." + JPAEntityUtils.getPhysicalColumnName(doClz, Updateable.UPDATE_DATE), Date.class);
rp.addFieldForUpdate(table + "." + JPAEntityUtils.getPhysicalColumnName(doClz, Updateable.UPDATE_DATE), Date.class);

descriptor.setReturningPolicy(rp);

where we do:

create or replace trigger %{TRIGGER_NAME}
before insert or update
on %{BASE_TABLE_NAME}
FOR EACH ROW
BEGIN
:NEW.%{UPDATE_TS_COLUMN} := %{SYSDATE_REFERENCE};
IF INSERTING THEN
:NEW.%{CREATE_TS_COLUMN} := %{SYSDATE_REFERENCE};
END IF;
end;

The issue is, now, when update happens, we clear out the create date column. Setting of the create date should only happen on the create, not update. If we roll back to 2.7.8 it works as it should.

Re: Problems migrating from eclipselink 2.7.8 to 2.7.9 [message #1849503 is a reply to message #1847975] Fri, 21 January 2022 15:42 Go to previous message
Eclipse UserFriend
Apparently there was a bug introduced in 2.7.9, 2.7.10 has fixed the problem.
Previous Topic:Metamodel Generation
Next Topic:Is there any guide for migration from 2.7.9 to 3.0.x?
Goto Forum:
  


Current Time: Fri Jul 11 21:51:38 EDT 2025

Powered by FUDForum. Page generated in 0.04945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top