I'm working on upgrading Keycloak from H5 to H6. I see the following warning:
{quote}SqmDynamicInstantiation:174 WARN Argument [org.hibernate.bugs.cl.Parent as p] for dynamic Map instantiation did not declare an 'injection alias' [parent] but such aliases are needed for dynamic Map instantiations; will likely cause problems later translating sqm{quote}
This is the query, please note that we put the entity in the map.
{quote}select new map(p as parent) from parent p{quote}
This example is simple and looks stupid with a single map entry - in the real code we place other fields from joins in it as well. Still, it is a minimal reproducer.
Despite the warning it seems to work fine.
Here's some extracted sample code: [https://github.com/hibernate/hibernate-test-case-templates/compare/main...ahus1:hibernate-test-case-templates:is-HHH-xxxx-warning-when-creating-map?expand=1|https://github.com/hibernate/hibernate-test-case-templates/compare/main...ahus1:hibernate-test-case-templates:is-HHH-xxxx-warning-when-creating-map?expand=1|smart-link]
How can I get rid of the warning?
Although I don’t see an immediate impact, am I missing something here it might have an impact?
Zulip discussion: [https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user/topic/H6-.3E.20H6.3A.20Warning.20SqmDynamicInstantiation.20dynamic.20map|https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user/topic/H6-.3E.20H6.3A.20Warning.20SqmDynamicInstantiation.20dynamic.20map] |
|