Enable joining the same association twice with Criteria
Description
Make double joining the same association with Criteria.createCriteria possible. See: http://forum.hibernate.org/viewtopic.php?t=931249
Environment
Activity
Today I encountered this… very annoying. I would need to join the same association multiple times (with different meanings and different additional join criteria), but hit this problem. Sad to see it’s still unresolved… and probably will ever be, since the Hibernate Criteria API is deprecated AFAIK.
Any effort to fix this issue?
Any valid solution for this issue? I got stuck in a similiar issue. http://stackoverflow.com/questions/28029158/grails-join-association-twice-in-criteria-api
I've attached a DetachedCriteria replacement/extension that deals with duplicate association paths, as long as the join type or alias is the same. Otherwise the same exception as usual occurs.
Simplest workaround I found :
Regards.