We are using Spring Data together with query dsl 3.5.1.
We have several queries that make use of the any() expression.
When looking at the JPA query String that is created it shows an exists query with a table that contains a generated table name. More specifically the name seems to ends with some random alphanumeric characters.
Unfortunately each time querydsl generates the JPA query this name is different.
This in turn causes polution in the hibernate query cache.
Would it be possible to implement a naming strategy that produces reproducible names for the any()-tables?
I don't quite know how Spring Data resolves query objects, but we lazily initialize the any paths inside the collection paths, to reuse those instances.
However, I think it should be okay to think of a naming strategy, but we transform any usage to a join via parent. since this should be a temporary alias, it must not collide with other names.
@timowest what is your opinion?
We can change the logic to always produce the same aliases