pefernan commented on code in PR #2298:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/2298#discussion_r2821546058
##########
data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/java/org/kie/kogito/app/audit/jpa/queries/JPADynamicQuery.java:
##########
@@ -112,7 +110,9 @@ private Object transform(GraphQLOutputType outputType,
Object source) {
if (outputType instanceof GraphQLScalarType) {
GraphQLScalarType scalarType = (GraphQLScalarType) outputType;
if ("DateTime".equals(scalarType.getName())) {
- target = OffsetDateTime.ofInstant(((Timestamp)
source).toInstant(), ZoneId.of("UTC"));
+ // Hibernate 7 returns OffsetDateTime directly for temporal
columns in native queries,
+ // not java.sql.Timestamp as in Hibernate 5/6. Use
DateTimeUtil for cross-version compatibility.
+ target = DateTimeUtil.toDateTime(source);
Review Comment:
maybe use static import directly here. Also no need to have this comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]