New MutationQuery and SelectionQuery interfaces in Hibernate 6

preview_player
Показать описание
One of the smaller changes in Hibernate 6 that can easily get overlooked and which Steve Ebersole presented in a recent Expert Session in the Persistence Hub, is the introduction of the MutationQuery and SelectionQuery interfaces. It allows the separation between queries that change data and the ones that select it from the database.
Older Hibernate versions and the JPA specification use the Query interface to handle both types of queries. It extends the SelectionQuery and MutationQuery interfaces. And you can, of course, still use that interface with Hibernate 6. But the 2 new interfaces are much cleaner because each only defines the methods you can use with the corresponding type of query. And as I will show you in this video, it also enables a stricter validation of the provided statement.

Like my channel? Subscribe!

Want to connect with me?
Рекомендации по теме
Комментарии
Автор

Does finally return immutable collection?

konstantingromov