# Hibernate

Hibernate is a Java ORM solution that maps object-oriented program data to relational databases and supports persistence.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Keycloak 22.0.0 released

DevFeed: [Keycloak 22.0.0 released](<https://devfeed.tech/articles/keycloak-22-0-0-released-31614.md>)

Original publisher: [Read original article](<https://www.keycloak.org/2023/07/keycloak-2200-released>)

Author: Keycloak Team

Published: 2023-07-11T00:00:00Z

Content type: release

Language: en

Sources: [Keycloak Blog](<https://devfeed.tech/sources/keycloak-blog.md>)

Topics: [Keycloak](<https://devfeed.tech/topics/keycloak.md>), [releases](<https://devfeed.tech/topics/releases.md>), [Release notes](<https://devfeed.tech/topics/release-notes.md>), [Quarkus](<https://devfeed.tech/topics/quarkus.md>), [Jakarta EE](<https://devfeed.tech/topics/jakarta-ee.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Java](<https://devfeed.tech/topics/java.md>), [upgrade](<https://devfeed.tech/topics/upgrade.md>), [deprecated](<https://devfeed.tech/topics/deprecated.md>)

Tags: [deprecated](<https://devfeed.tech/tags/deprecated.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [idm](<https://devfeed.tech/tags/idm.md>), [jakarta-ee](<https://devfeed.tech/tags/jakarta-ee.md>), [java](<https://devfeed.tech/tags/java.md>), [kerberos](<https://devfeed.tech/tags/kerberos.md>), [keycloak](<https://devfeed.tech/tags/keycloak.md>), [keycloak-release](<https://devfeed.tech/tags/keycloak-release.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [quarkus](<https://devfeed.tech/tags/quarkus.md>), [release](<https://devfeed.tech/tags/release.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [saml](<https://devfeed.tech/tags/saml.md>), [sso](<https://devfeed.tech/tags/sso.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

### AI overview

Keycloak 22.0.0 removes Java 11 support, upgrades to Quarkus 3.x and Hibernate ORM 6.2, migrates from Java EE to Jakarta EE 10, and adds a KeyStore Vault implementation and KeyStore Config Source.

### Source excerpt

To download the release go to Keycloak downloads. Release notes Server Distribution Java 11 support removed Running the Keycloak server with Java 11 is no longer supported. Java 11 was deprecated in Keycloak 21 with the announced plan to be removed in Keycloak 22. Upgrade to Quarkus 3.x Keycloak upgraded to version 3.2.0.Final of the Quarkus Java framework. Quarkus 3.x continues the tradition of propelling Java development by moving fast and providing a cutting-edge user experience with the latest technologies. Transition from Java EE to Jakarta EE As part of upgrading to Quarkus 3.x Keycloak migrated its codebase from Java EE (Enterprise Edition) to its successor Jakarta EE, which brings various changes into Keycloak. We have upgraded all Jakarta EE specifications in order to support Jakarta EE 10. Context and dependency injection no longer enabled to JAX-RS Resources In order to provide a better runtime and leverage as much as possible the underlying stack, all injection points for contextual data using the javax.ws.rs.core.Context annotation were removed. The expected improvement in performance involves no longer creating proxies instances multiple times during the request lifecycle, and drastically reducing the amount of reflection code at runtime. Upgrade to Hibernate ORM 6 Keycloak now benefits from the upgrade to Hibernate ORM 6.2, which includes improved performance, better SQL, modern JDK support, and support for modern RDBMS features. Elytron credential store replacement The previous and now removed WildFly distribution provided a built-in vault provider that reads secrets from a keystore-backed Elytron credential store. As this is no longer available, we have added a new implementation of the Keycloak Vault SPI called Keycloak KeyStore Vault. As the name suggests, this implementation reads secrets from a Java keystore file. Such secrets can be then used within multiple places of the Administration Console. For further details, see our guide and the latest

## Keycloak 21.0.0 released

DevFeed: [Keycloak 21.0.0 released](<https://devfeed.tech/articles/keycloak-21-0-0-released-31602.md>)

Original publisher: [Read original article](<https://www.keycloak.org/2023/02/keycloak-2100-released>)

Author: Keycloak Team

Published: 2023-02-23T00:00:00Z

Content type: release

Language: en

Sources: [Keycloak Blog](<https://devfeed.tech/sources/keycloak-blog.md>)

Topics: [Keycloak](<https://devfeed.tech/topics/keycloak.md>), [saml](<https://devfeed.tech/topics/saml.md>), [Cordova](<https://devfeed.tech/topics/cordova.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [cordova](<https://devfeed.tech/tags/cordova.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [idm](<https://devfeed.tech/tags/idm.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [kerberos](<https://devfeed.tech/tags/kerberos.md>), [keycloak](<https://devfeed.tech/tags/keycloak.md>), [keycloak-release](<https://devfeed.tech/tags/keycloak-release.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [migration-guide](<https://devfeed.tech/tags/migration-guide.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [policies](<https://devfeed.tech/tags/policies.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [release](<https://devfeed.tech/tags/release.md>), [saml](<https://devfeed.tech/tags/saml.md>), [sso](<https://devfeed.tech/tags/sso.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

Keycloak 21.0.0 is released with new features, enhancements, documentation updates, and resolved issues. Changes include Microsoft Authenticator support, multi-hosted-domain support for GoogleIdentityProvider, Cordova redirect URI configuration, SAML signature updates, and storage improvements.

### Source excerpt

To download the release go to Keycloak downloads. Upgrading Before upgrading refer to the migration guide for a complete list of changes. All resolved issues New features #11698 Add an option allowing to disable client registration access token rotation keycloak #15271 Add support for Microsoft Authenticator keycloak #16107 Short verification_uri for Device Authorization Request keycloak #16787 support multi hosted-domain in `GoogleIdentityProvider` keycloak #17037 Allow configuring of redirectUri for the cordova adapter keycloak adapter/javascript Enhancements #1738 Deprecate SHA1 based algorithms for SAML signatures keycloak-documentation #1743 Documentation of some options of SAML IDP is not up-to-date keycloak-documentation #8820 Official Support for Microsoft mobile authenticator app keycloak #8982 Blacklist false positive rate could be set a lot lower. keycloak #9008 Update client with registration access token gained by client registration keycloak authorization-services #9017 Pre-authorization hook for client policies keycloak #9144 Remove Hashicorp Support keycloak dist/quarkus #9388 Global lock interface keycloak storage #9420 Use bulk deletes in HotRod store keycloak storage #9699 Include list of possible option values in help messages. keycloak dist/quarkus #10018 JPA Map Storage: leverage function-based indexes (Postgresql) keycloak storage #10090 Remove workaround in HotRodUtils#paginateQuery keycloak storage #10376 Add MapKeycloakTransaction.exists(id) method keycloak storage #10988 Remove doubled field from HotRod entities keycloak storage #11744 Remove `session.area().getById(id)` from Map provider methods keycloak storage #12067 Investigate a way to update indexes in no-downtime way for HotRod store keycloak storage #12068 Leverage Infinispan lifespan for ExpirableEntities in HotRod storage keycloak storage #12950 Implement "advanced claim to group" mapping for SAML keycloak #13219 Followup: JPA Map store wants to use `hibernate.integrator_provider

## Kotlin first impressions

DevFeed: [Kotlin first impressions](<https://devfeed.tech/articles/kotlin-first-impressions-27287.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201711/kotlin-first-impressions/>)

Published: 2017-11-29T00:00:00Z

Content type: opinion

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Development](<https://devfeed.tech/topics/development.md>), [Java](<https://devfeed.tech/topics/java.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>)

Tags: [development](<https://devfeed.tech/tags/development.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

A developer shares first impressions from using Kotlin on an actively developed project. The article discusses Kotlin's default immutability, extension methods, interoperability with Java, integration with Spring and Hibernate, Gradle build scripts, named parameters, and compile-time null checks.

### Source excerpt

Recently while starting work on a project we've (team of two ;)) decided to try something new and use Kotlin. The project is far from ready and still under active development, but after writing some code in Kotlin I've got few observations I'd like to share. Read more

## Database migrations

DevFeed: [Database migrations](<https://devfeed.tech/articles/database-migrations-27283.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201710/databse-migrations/>)

Published: 2017-10-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Database Migration](<https://devfeed.tech/topics/database-migration.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [java](<https://devfeed.tech/tags/java.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [schema](<https://devfeed.tech/tags/schema.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This article shares practical guidance for evolving database schemas with migrations. It recommends starting new projects with Hibernate schema generation, then switching to validation and Flyway migrations once the schema is stable, while avoiding manual DDL changes and out-of-order migrations.

### Source excerpt

Most of the application we are working on are built around the data. Since the information is the core value of the application we store it in the persistent and reliable storage - database. Applications evolve in time so does the way we store the data. In this post, I'm going to present my experiences and thoughts on evolving database schema. Read more

## Using Spring Data @DomainEvents with JPA and Hibernate

DevFeed: [Using Spring Data @DomainEvents with JPA and Hibernate](<https://devfeed.tech/articles/poor-s-man-domain-events-27284.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201710/domain-events/>)

Published: 2017-10-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [jpa](<https://devfeed.tech/topics/jpa.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [spring](<https://devfeed.tech/tags/spring.md>)

### AI overview

This tutorial examines Spring Data's @DomainEvents and @AfterDomainEventPublication annotations, explains their repository-based event publishing behavior, and discusses why that behavior does not work automatically for commonly used JPA dirty checking. It then presents Hibernate interceptor-based event propagation as an approach for JPA entities.

### Source excerpt

While investigating @EventListeners in spring I've noticed very interesting annotation - @DomainEvents. In this post I'm going to check what can be achieved using @DomainEvents annotation and how to effectively use it with old good JPA. Let's start with short introduction to domain event idea if you are not yet familiar with it. Now let's go back to the @DomainEvents annotation in spring-data. Spring-data by default provides support for this annotation and it's complementary annotation @AfterDomainEventPublication. Read more

## Poor man's batch processing in JPA

DevFeed: [Poor man's batch processing in JPA](<https://devfeed.tech/articles/poor-man-s-batch-processing-in-jpa-27270.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201705/batch-processing/>)

Published: 2017-05-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [jpa](<https://devfeed.tech/topics/jpa.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [cache](<https://devfeed.tech/tags/cache.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This article explains batch processing with JPA, Hibernate, and Spring Data. It recommends regularly flushing and clearing the persistence context, controlling transaction size, choosing a deterministic data-fetching order, and considering purpose-built frameworks or libraries for the job.

### Source excerpt

Working with a lot of data using plain JPA or hibernate or spring-data is possible, it does work and usually, it doesn't require a lot of extra coding. Starting small is the fastest way of getting things done but you must be aware of few things that might shoot you in the foot. Read more

## Final fields

DevFeed: [Final fields](<https://devfeed.tech/articles/final-fields-27264.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201612/final-fields/>)

Published: 2016-12-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Java](<https://devfeed.tech/topics/java.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [java](<https://devfeed.tech/tags/java.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [trace](<https://devfeed.tech/tags/trace.md>)

### AI overview

This tutorial explains how private final fields can be modified through reflection, including how Hibernate uses the technique to hydrate final entity fields. It also demonstrates how Java compile-time constants and inlining can cause modified primitive final fields to behave unexpectedly, while object fields such as Long can reflect the changed value.

### Source excerpt

Private final field modification is possible and it doesn't require a lot of work. Since you should not use this mechanism in real life there are cases when it is useful. For example this how is Hibernate using this to hydrate final entity fields. But when using final fields with Hibernate you should be extra careful how you declare them. Read more

## Java repositories testing

DevFeed: [Java repositories testing](<https://devfeed.tech/articles/java-repositories-testing-27263.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201611/java-repository-testing/>)

Published: 2016-11-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Java](<https://devfeed.tech/topics/java.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>)

Tags: [hibernate](<https://devfeed.tech/tags/hibernate.md>), [java](<https://devfeed.tech/tags/java.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [sql](<https://devfeed.tech/tags/sql.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

A tutorial on testing Java repository layers, motivated by a slow SQL query in a Hibernate-based application. It recommends detailed tests, production-like database setup, migration scripts, and running CI tests against the production database technology.

### Source excerpt

A few days ago I've stumbled upon SQL query performance issue. Git claims that I was the author so maybe that's the reason I remember this feature. There was like 3 classes, everything was super easy and super fast all I needed to do was to let Hibernate do its thing. Then time passed, new features were requested, the model becomes more complex, the number of rows increased to ~4 million and original query became too slow. When working on query optimization I was really happy to find that detailed tests are in place. With proper test setup I was able to test my new query to make sure all requirements are met and then quickly copy paste query to sqldeveloper run it on a test environment and verify if performance is acceptable. It wasn't simple query and it took me some time to figure out how to make it quick and work exactly as old one. That was the time I was really glad that we invested in detailed unit tests in the beginning. Read more