About Renderable interface

Hello,
In Hibernate 5.6, the Renderable interface supported dynamically rendering HQL fragments and converting them into predicate objects. This allowed me to conveniently use string-based expressions like:
exists(select 1 from A a where a = root_.aid and a.f1 = :f1 and ...).

For simple conditions, I could construct predicates using the Criteria API. For complex nested conditions, I could easily write HQL fragments as strings. By implementing Renderable, predicates were automatically constructed with secure parameter binding.

In version 6.6, I haven’t found a similar implementation approach. Could you advise if there’s an equivalent alternative to achieve this requirement? Alternatively, is such functionality planned for future releases?

Thank you.
@beikov

This was never “supported”, but rather an unfortunate implementation detail. No such feature is planned for future Hibernate ORM versions. You will have to construct these fragments through the JPA Criteria API.

Perhaps the HQL sql() function helps: A Guide to Hibernate Query Language

Thank you, I’m know this api. However, using raw SQL isn’t suitable for my requirements. Our framework layer automatically constructs unit and binary conditions using the Criteria API through established conventions. The remaining conditions involve complex nested subqueries that need to be dynamically generated. My expectation is to input HQL fragments and params and then output predicate objects, which I’ll then add to the existing predicate collection for final query execution.