HQL Numeric Literal Types
Version 3.2 of the Jakarta Persistence specification
clarifies the interpretation of
numeric literals with regard to type, explicitly aligning with the Java specification (as well
as adopting Hibernate’s long-standing
HQL and JPQL are domain/object-level queries, so that makes perfect sense.
Long- 123l, 123L
BigInteger- 123bi, 123BI
Float- 123.4f, 123.4F
BigDecimal- 123.4bd, 123.4BD
Hibernate 6.3 aligns with those interpretations, which may lead to different behavior from prior versions.
Batch Fetching and LockMode
When LockMode is greater than READ Hibernate does not execute the batch fetching so existing uninitialized proxies will not be initialized. This because the lock mode is different from the one of the proxies in the batch fetch queue.
MyEntity proxy = session.getReference( MyEntity.class, 1 ); MyEntity myEntity = session.find(MyEntity.class, 2, LockMode.WRITE);
only the entity with id equals to 2 will be loaded but the proxy will not be initialized.