This is still happening to me with 5.0.3.Final (and I took quite a bit to upgrade and test it).
The bug is still 100% here: even our extra ugly startup workaround still works. I will share it, but it saddens me that that there is not real fix available yet.
// run a fake query on startup repo.count((rn,cq,cb) -> { fixPersisersMap((CriteriaBuilderImpl)cb); return cb.or(); // return a criteria that evaluates to false }
); }
public void fixPersisersMap(CriteriaBuilderImpl criteriaBuilderImpl) { Map<String,CollectionPersister> persisters = criteriaBuilderImpl .getEntityManagerFactory() .getSessionFactory() .getCollectionPersisters(); persisters.putIfAbsent(INNER.class.getCanonicalName() + ".innerField", persisters.get(OUTER.class.getCanonicalName() + ".outerField.innerField")); }
|