[hibernate/hibernate-orm] f8e4e6: HHH-16861 HQL ordinal() function
by Luca Molteni
Branch: refs/heads/main
Home: https://github.com/hibernate/hibernate-orm
Commit: f8e4e6e49f5b85b719633a8f55193c0f4ae4e608
https://github.com/hibernate/hibernate-orm/commit/f8e4e6e49f5b85b719633a8...
Author: Luca Molteni <volothamp(a)gmail.com>
Date: 2024-09-30 (Mon, 30 Sep 2024)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
M hibernate-core/src/main/java/org/hibernate/dialect/OracleUserDefinedTypeExporter.java
A hibernate-core/src/main/java/org/hibernate/dialect/function/OrdinalFunction.java
M hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java
M hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/FunctionParameterType.java
A hibernate-core/src/test/java/org/hibernate/orm/test/hql/EnumTest.java
Log Message:
-----------
HHH-16861 HQL ordinal() function
The `ordinal` function returns the `ordinal` property of Java enums, for both enums mapped as ORDINAL and enums mapped as STRING generating different SQL in each case
`ordinal(field)` is equivalent to `cast(enum as Integer)`, implementation taken from CastStrEmulation when used on ordinal mapped enums.
Lexer and parser don't need to be changed as there is nakedIdentifier that matches custom function names
`ordinal` function is validated to work only on Java enum fields
Use convertToRelationalValue to generate enum value inside the SQL query
Co-authored-by: Christian Beikov <christian.beikov(a)gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/hibernate/hibernate-orm/settings/notifications
2 months
[hibernate/hibernate-orm] fee9e8: HHH-18457 Remove deprecated org.hibernate.Metamode...
by Andrea Boriero
Branch: refs/heads/main
Home: https://github.com/hibernate/hibernate-orm
Commit: fee9e86579a062f417377a6a09dd15f408a898f1
https://github.com/hibernate/hibernate-orm/commit/fee9e86579a062f417377a6...
Author: Andrea Boriero <andrea(a)hibernate.org>
Date: 2024-09-26 (Thu, 26 Sep 2024)
Changed paths:
R hibernate-core/src/main/java/org/hibernate/Metamodel.java
M hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryDelegatingImpl.java
M hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryImplementor.java
M hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java
M hibernate-core/src/main/java/org/hibernate/metamodel/MappingMetamodel.java
M hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java
M hibernate-core/src/main/java/org/hibernate/metamodel/spi/MappingMetamodelImplementor.java
R hibernate-core/src/main/java/org/hibernate/metamodel/spi/MetamodelImplementor.java
M hibernate-core/src/test/java/org/hibernate/orm/test/annotations/entitynonentity/EntityNonEntityTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/entitygraph/EntityGraphUsingFetchGraphTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/jpa/EntityManagerUnwrapTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/CustomTypeConverterTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/MetamodelTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/serialization/CacheKeyEmbeddedIdEnanchedTest.java
M migration-guide.adoc
M tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/MockCollectionPersister.java
M tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/MockSessionFactory.java
Log Message:
-----------
HHH-18457 Remove deprecated org.hibernate.Metamodel and org.hibernate.metamodel.spi.MetamodelImplementor
To unsubscribe from these emails, change your notification settings at https://github.com/hibernate/hibernate-orm/settings/notifications
2 months, 1 week