-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems with session customizer when upgrading to 2.7.9 #1363
Comments
rfelcman
added a commit
to rfelcman/eclipselink
that referenced
this issue
Nov 24, 2021
…nit test fixes eclipse-ee4j#1363 Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
rfelcman
added a commit
to rfelcman/eclipselink
that referenced
this issue
Nov 25, 2021
…nit test (eclipse-ee4j#1364) Standalone usage ReturnUpdate annotation was broken in PR eclipse-ee4j#1016. fixes eclipse-ee4j#1363 Signed-off-by: Radek Felcman <radek.felcman@oracle.com> (cherry picked from commit fb1cc69)
rfelcman
added a commit
to rfelcman/eclipselink
that referenced
this issue
Nov 25, 2021
…nit test fixes eclipse-ee4j#1363 Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
thanks, will there be a 2.7.10 or such eventually, or is this only available in 3.x? |
As You can see from PRs above it will be part of master (4.0), 3.x and 2.7.x (2.7.10) branches. |
rfelcman
added a commit
that referenced
this issue
Nov 29, 2021
For a testing You can try nightly build e.g. 2.7.10 section Build ID 20211130 or latest 2.7.10-SNAPSHOT from https://jakarta.oss.sonatype.org/content/repositories/snapshots/org/eclipse/persistence/eclipselink/2.7.10-SNAPSHOT/ . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: