You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/moderne-recipes.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,33 +127,33 @@ This doc includes every recipe that is exclusive to users of Moderne. For a full
127
127
128
128
## rewrite-hibernate
129
129
130
-
*[Find JPQL definitions](/recipes/hibernate/search/findjpqldefinitions.md) - _Find Java Persistence Query Language definitions in the codebase._
131
-
*[Fix conflicting class type annotation Hibernate 6.6](/recipes/hibernate/update66/fixconflictingclasstypeannotations.md) - _Since Hibernate 6.6 a mapped class can have *either*`@MappedSuperclass` or `@Embeddable`, or `@Entity`. This recipe removes `@Entity` from classes annotated with `@MappedSuperclass` or `@Embeddable`. For the moment die combination of `@MappedSuperclass` or `@Embeddable` is advised to migrate to [Single Table Inheritance](https://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/Hibernate_User_Guide.html#entity-inheritance-single-table) but still accepted and therefore stays._
132
-
*[Migrate @JdbcType to @JdbcTypeCode](/recipes/hibernate/update70/migratejdbctypetojdbctypecode.md) - _In Hibernate 7.0, various JDBC types were moved to internal packages. Use @JdbcTypeCode with SqlTypes constants instead of @JdbcType with specific classes._
*[Migrate Hibernate `Integrator#integrate` method](/recipes/hibernate/update70/migrateintegratormethod.md) - _Migrate Hibernate `Integrator#integrate` method from deprecated signature to Hibernate 7 compatible signature. Changes `integrate(Metadata, SessionFactoryImplementor, SessionFactoryServiceRegistry)` to `integrate(Metadata, BootstrapContext, SessionFactoryImplementor)`._
135
-
*[Migrate LockOptions to direct parameters](/recipes/hibernate/update70/migratelockoptionstodirectparameters.md) - _Migrates deprecated `LockOptions` usage to direct parameters in method calls. As of JPA 3.2 and Hibernate 7, `LockMode`, `Timeout`, and `PessimisticLockScope` are passed directly to `find()`, `refresh()`, and `lock()` methods instead of being wrapped in a `LockOptions` object._
136
-
*[Migrate NaturalIdLoadAccess method calls](/recipes/hibernate/update70/migratenaturalidloadaccess.md) - _Migrates NaturalIdLoadAccess#using(Object...) to using(Map.of(...)) variants for Hibernate 7.0._
137
-
*[Migrate NaturalIdMultiLoadAccess method calls](/recipes/hibernate/update70/migratenaturalidmultiloadaccess.md) - _Migrates NaturalIdMultiLoadAccess#compoundValue(Object...) to Map.of(...) variants for Hibernate 7.0._
138
-
*[Migrate Session interface method calls](/recipes/hibernate/update70/migratesessioninterface.md) - _Migrates code using deprecated Session interface methods to their Hibernate 7.0 replacements._
139
-
*[Migrate Session save/update/delete method calls](/recipes/hibernate/update70/migratesessiontodefertojpa.md) - _Migrates code using deprecated Session load/get/refresh/save/update/delete methods to their Hibernate 7.0 replacements._
140
-
*[Migrate `Configurable.configure()` to use `GeneratorCreationContext`](/recipes/hibernate/update70/migrateconfigurabletogeneratorcreationcontext.md) - _In Hibernate 7.0, `Configurable.configure()` now takes a `GeneratorCreationContext` parameter instead of `ServiceRegistry`. This recipe migrates method signatures and call sites._
141
-
*[Migrate `MetamodelImplementor` to Hibernate 7.0](/recipes/hibernate/update70/migratemetamodelimplementor.md) - _In Hibernate 7.0, `MetamodelImplementor` has been split into `MappingMetamodel` for ORM-specific operations and `JpaMetamodel` for JPA-standard operations. This recipe migrates the usage based on which methods are called._
142
-
*[Migrate `setFlushMode()` to `setQueryFlushMode()`](/recipes/hibernate/update70/migratesetflushmodetosetqueryflushmode.md) - _In Hibernate 7.0, `CommonQueryContract.setFlushMode(FlushModeType)` has been replaced with `setQueryFlushMode(QueryFlushMode)`. This recipe migrates the method call and converts `FlushModeType` parameters to their `QueryFlushMode` equivalents._
143
-
*[Migrate implicit cascade=PERSIST for @Id and @MapsId associations](/recipes/hibernate/update70/addcascadepersisttoidmappedassociations.md) - _Hibernate used to automatically enable cascade=PERSIST for association fields annotated @Id or @MapsId. This was undocumented and unexpected behavior, and no longer supported in Hibernate 7. Existing code which relies on this behavior will be modified by addition of explicit cascade=PERSIST to the association fields._
144
-
*[Migrate to @TargetEmbeddable](/recipes/hibernate/update70/migratetotargetembeddable.md) - _Migrates code using removed @Target to to Hibernate 7.0's @TargetEmbeddable equivalent. Removes misused @Target annotations._
145
-
*[Migrate to Hibernate 6.6.x](/recipes/hibernate/migratetohibernate66.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 6.6.x._
146
-
*[Migrate to Hibernate 7 JFR APIs](/recipes/hibernate/update70/migratetohibernate7jfr.md) - _Migrates deprecated JFR integration APIs to their Hibernate 7 replacements. `EventManager` becomes `EventMonitor` and `HibernateMonitoringEvent` becomes `DiagnosticEvent`._
147
-
*[Migrate to Hibernate 7.0.x](/recipes/hibernate/migratetohibernate70.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x._
148
-
*[Migrate to Hibernate 7.1.x](/recipes/hibernate/migratetohibernate71.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x._
149
-
*[Null safe Transaction#getTimeout()](/recipes/hibernate/update70/unboxingtransactiontimeout.md) - _JPA 3.2 adds `#getTimeout` but uses `Integer` whereas Hibernate has historically used `int`. Note that this raises the possibility of a `NullPointerException` during migration if, e.g., performing direct comparisons on the timeout value against an in (auto unboxing). This recipe adds ternary operators where `Transaction#getTimeout()` is used and a negative value will be used if the `getTimeout()` resulted in a null value._
150
-
*[Remove leaking of SessionFactoryImplementor from `org.hibernate.usertype.CompositeUserType` invocations and implementations](/recipes/hibernate/update70/compositeusertypesessionfactoryimplementor.md) - _Remove leaking of SessionFactoryImplementor from `org.hibernate.usertype.CompositeUserType` invocations and implementations._
151
-
*[Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` implementations](/recipes/hibernate/update70/usertypesharedsessioncontractimplementor.md) - _Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` implementations._
152
-
*[Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` invocations](/recipes/hibernate/update70/usertypenullsafegetsharedsessioncontractimplementorrecipe.md) - _Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` invocations._
153
-
*[Remove table from single table inherited entity](/recipes/hibernate/update66/removetablefrominheritedentity.md) - _For Single Table Inherited Entities Hibernate ignores the `@Table` annotation on child entities. From Version 6.6 it is considered an error._
154
-
*[Remove unnecessary cast to `Session` for `SessionFactory.createEntityManager()`](/recipes/hibernate/update70/removeunnecessarycasttosession.md) - _In Hibernate 7.0, `SessionFactory.createEntityManager()` explicitly returns Session, making casts to Session unnecessary._
155
-
*[Replace Session.buildLockRequest with LockOptions](/recipes/hibernate/update70/replacesessionlockrequest.md) - _Migrates Session.buildLockRequest(LockOptions.X) calls to use session.lock(entity, new LockOptions(LockMode.X)) in Hibernate 7.0._
156
-
*[Replace hibernate annotations with Jakarta variants](/recipes/hibernate/update70/replacehibernatewithjakartaannotations.md) - _Tries to replaces annotations that have been removed in Hibernate 7.0 with its Jakarta equivalent, such as Table, @Where, @OrderBy, etc. If a annotation is used with arguments that do not have a direct replacement, the annotation is not replaced at all._
130
+
*[Find JPQL definitions](/recipes/hibernate/search/findjpqldefinitions-moderne-edition.md) - _Find Java Persistence Query Language definitions in the codebase._
131
+
*[Fix conflicting class type annotation Hibernate 6.6](/recipes/hibernate/update66/fixconflictingclasstypeannotations-moderne-edition.md) - _Since Hibernate 6.6 a mapped class can have *either*`@MappedSuperclass` or `@Embeddable`, or `@Entity`. This recipe removes `@Entity` from classes annotated with `@MappedSuperclass` or `@Embeddable`. For the moment die combination of `@MappedSuperclass` or `@Embeddable` is advised to migrate to [Single Table Inheritance](https://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/Hibernate_User_Guide.html#entity-inheritance-single-table) but still accepted and therefore stays._
132
+
*[Migrate @JdbcType to @JdbcTypeCode](/recipes/hibernate/update70/migratejdbctypetojdbctypecode-moderne-edition.md) - _In Hibernate 7.0, various JDBC types were moved to internal packages. Use @JdbcTypeCode with SqlTypes constants instead of @JdbcType with specific classes._
*[Migrate Hibernate `Integrator#integrate` method](/recipes/hibernate/update70/migrateintegratormethod-moderne-edition.md) - _Migrate Hibernate `Integrator#integrate` method from deprecated signature to Hibernate 7 compatible signature. Changes `integrate(Metadata, SessionFactoryImplementor, SessionFactoryServiceRegistry)` to `integrate(Metadata, BootstrapContext, SessionFactoryImplementor)`._
135
+
*[Migrate LockOptions to direct parameters](/recipes/hibernate/update70/migratelockoptionstodirectparameters-moderne-edition.md) - _Migrates deprecated `LockOptions` usage to direct parameters in method calls. As of JPA 3.2 and Hibernate 7, `LockMode`, `Timeout`, and `PessimisticLockScope` are passed directly to `find()`, `refresh()`, and `lock()` methods instead of being wrapped in a `LockOptions` object._
136
+
*[Migrate NaturalIdLoadAccess method calls](/recipes/hibernate/update70/migratenaturalidloadaccess-moderne-edition.md) - _Migrates NaturalIdLoadAccess#using(Object...) to using(Map.of(...)) variants for Hibernate 7.0._
137
+
*[Migrate NaturalIdMultiLoadAccess method calls](/recipes/hibernate/update70/migratenaturalidmultiloadaccess-moderne-edition.md) - _Migrates NaturalIdMultiLoadAccess#compoundValue(Object...) to Map.of(...) variants for Hibernate 7.0._
138
+
*[Migrate Session interface method calls](/recipes/hibernate/update70/migratesessioninterface-moderne-edition.md) - _Migrates code using deprecated Session interface methods to their Hibernate 7.0 replacements._
139
+
*[Migrate Session save/update/delete method calls](/recipes/hibernate/update70/migratesessiontodefertojpa-moderne-edition.md) - _Migrates code using deprecated Session load/get/refresh/save/update/delete methods to their Hibernate 7.0 replacements._
140
+
*[Migrate `Configurable.configure()` to use `GeneratorCreationContext`](/recipes/hibernate/update70/migrateconfigurabletogeneratorcreationcontext-moderne-edition.md) - _In Hibernate 7.0, `Configurable.configure()` now takes a `GeneratorCreationContext` parameter instead of `ServiceRegistry`. This recipe migrates method signatures and call sites._
141
+
*[Migrate `MetamodelImplementor` to Hibernate 7.0](/recipes/hibernate/update70/migratemetamodelimplementor-moderne-edition.md) - _In Hibernate 7.0, `MetamodelImplementor` has been split into `MappingMetamodel` for ORM-specific operations and `JpaMetamodel` for JPA-standard operations. This recipe migrates the usage based on which methods are called._
142
+
*[Migrate `setFlushMode()` to `setQueryFlushMode()`](/recipes/hibernate/update70/migratesetflushmodetosetqueryflushmode-moderne-edition.md) - _In Hibernate 7.0, `CommonQueryContract.setFlushMode(FlushModeType)` has been replaced with `setQueryFlushMode(QueryFlushMode)`. This recipe migrates the method call and converts `FlushModeType` parameters to their `QueryFlushMode` equivalents._
143
+
*[Migrate implicit cascade=PERSIST for @Id and @MapsId associations](/recipes/hibernate/update70/addcascadepersisttoidmappedassociations-moderne-edition.md) - _Hibernate used to automatically enable cascade=PERSIST for association fields annotated @Id or @MapsId. This was undocumented and unexpected behavior, and no longer supported in Hibernate 7. Existing code which relies on this behavior will be modified by addition of explicit cascade=PERSIST to the association fields._
144
+
*[Migrate to @TargetEmbeddable](/recipes/hibernate/update70/migratetotargetembeddable-moderne-edition.md) - _Migrates code using removed @Target to to Hibernate 7.0's @TargetEmbeddable equivalent. Removes misused @Target annotations._
145
+
*[Migrate to Hibernate 6.6.x](/recipes/hibernate/migratetohibernate66-moderne-edition.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 6.6.x._
146
+
*[Migrate to Hibernate 7 JFR APIs](/recipes/hibernate/update70/migratetohibernate7jfr-moderne-edition.md) - _Migrates deprecated JFR integration APIs to their Hibernate 7 replacements. `EventManager` becomes `EventMonitor` and `HibernateMonitoringEvent` becomes `DiagnosticEvent`._
147
+
*[Migrate to Hibernate 7.0.x](/recipes/hibernate/migratetohibernate70-moderne-edition.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x._
148
+
*[Migrate to Hibernate 7.1.x](/recipes/hibernate/migratetohibernate71-moderne-edition.md) - _This recipe will apply changes commonly needed when migrating to Hibernate 7.0.x._
149
+
*[Null safe Transaction#getTimeout()](/recipes/hibernate/update70/unboxingtransactiontimeout-moderne-edition.md) - _JPA 3.2 adds `#getTimeout` but uses `Integer` whereas Hibernate has historically used `int`. Note that this raises the possibility of a `NullPointerException` during migration if, e.g., performing direct comparisons on the timeout value against an in (auto unboxing). This recipe adds ternary operators where `Transaction#getTimeout()` is used and a negative value will be used if the `getTimeout()` resulted in a null value._
150
+
*[Remove leaking of SessionFactoryImplementor from `org.hibernate.usertype.CompositeUserType` invocations and implementations](/recipes/hibernate/update70/compositeusertypesessionfactoryimplementor-moderne-edition.md) - _Remove leaking of SessionFactoryImplementor from `org.hibernate.usertype.CompositeUserType` invocations and implementations._
151
+
*[Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` implementations](/recipes/hibernate/update70/usertypesharedsessioncontractimplementor-moderne-edition.md) - _Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` implementations._
152
+
*[Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` invocations](/recipes/hibernate/update70/usertypenullsafegetsharedsessioncontractimplementorrecipe-moderne-edition.md) - _Remove leaking of SharedSessionContractImplementor from `org.hibernate.usertype.UserType` invocations._
153
+
*[Remove table from single table inherited entity](/recipes/hibernate/update66/removetablefrominheritedentity-moderne-edition.md) - _For Single Table Inherited Entities Hibernate ignores the `@Table` annotation on child entities. From Version 6.6 it is considered an error._
154
+
*[Remove unnecessary cast to `Session` for `SessionFactory.createEntityManager()`](/recipes/hibernate/update70/removeunnecessarycasttosession-moderne-edition.md) - _In Hibernate 7.0, `SessionFactory.createEntityManager()` explicitly returns Session, making casts to Session unnecessary._
155
+
*[Replace Session.buildLockRequest with LockOptions](/recipes/hibernate/update70/replacesessionlockrequest-moderne-edition.md) - _Migrates Session.buildLockRequest(LockOptions.X) calls to use session.lock(entity, new LockOptions(LockMode.X)) in Hibernate 7.0._
156
+
*[Replace hibernate annotations with Jakarta variants](/recipes/hibernate/update70/replacehibernatewithjakartaannotations-moderne-edition.md) - _Tries to replaces annotations that have been removed in Hibernate 7.0 with its Jakarta equivalent, such as Table, @Where, @OrderBy, etc. If a annotation is used with arguments that do not have a direct replacement, the annotation is not replaced at all._
0 commit comments