I am using the JPA criteria API with hibernate 5.4.33 as provider.
Within one query, I am using
cp.construct(SomeClass.class,
SomeEntity_.property,
cb.currentTimestamp());
This is working well with SQLServer and Oracle but not working with Firebird. With Firebird the result is a NullPointerException
(which is nastily caught and rethrown several times), where the root-cause is within class org.hibernate.hql.internal.Namegenerator#generateColumnNames
, where the Type[]
argument contains null
as type of the cb.currentTimestamp()
part of the query.
I am under the impression this might be a bug in hibernate, yet I am not certain.
Has anyone any idea whether I made a mistake here or whether there is a workaround or whether I should file a bug against hibernate?
=== EDIT ===
After some more research, the issue seems to be, that AbstractTransactSQLDialect
registers a function current_timestamp
and with this registration, this function will be made known to be of return type TIMESTAMP
.
No similar function-registration is being done with the InterbaseDialect (which is the base of FirebirdDialect).
Why is this so?