Issue
In the Hibernate 6.0 Roadmap (https://github.com/hibernate/hibernate-orm/wiki/Roadmap6.0) SQM is mentioned as upcoming.
What is SQM?
In this roadmap the following short words describe it:
SQM integration: Improved performance for SQL generation and execution (smaller SQL, position-based extraction of results rather than name(alias)-based); Unified approach for HQL, JPQL and Criteria queries.
This is all I've found about SQM. Could someone please explain it a little more in detail? What exactly is it, how will it look like when it comes to coding, which benefits will it have?
Solution
SQM stands for Semantic Query Model, and it is the new entity query parser that addresses both JPQL and Criteria API.
The new parser is going to be much more flexible so we provide better SQL translation of entity queries.
From a user perspective, SQM should provide better performance while Hibernate project developers will bring a better API to handle the entity query parsing logic.
Answered By - Vlad Mihalcea
Answer Checked By - David Goodson (JavaFixing Volunteer)