Duplicate Association Path when creating multiple aliases
Description
Hello All,
This is a bug I have noticed on my current NHibernate project. I tried to search for it on this forum and don't know if it has been rectified as of yet or not. However, the explanation for this bug is provided here:
http://derek-says.blogspot.com/2008/06/duplicate-association-path-bug-in.html
I would like to know if there is a way using criteria API to create multiple aliases that point to the same table. I would highly appreciate it if you could share any information on the same.
My criteria is pretty simple:
Environment
Activity
Moved here.
This issue is related to https://nhibernate.jira.com/browse/NHLQ-43 and a duplicate of the Hibernate defect/limitation https://hibernate.onjira.com/browse/HHH-879.
This limitation causes me to create ICriteria queries using subqueries, which will almost certainly result in sub-optimal execution plans. I'd rather not, but this might force me to abandon ICriteria and use native-SQL instead, which will result in much more verbose logic.