[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-879?page=co...
]
Silver Sepp commented on HHH-879:
---------------------------------
I was quite shocked to learn multiple association paths aren't allowed. I seem to have
gotten around the problem for now by using EXISTS' and subqueries. Execution plan is
not as good as it would have been with regular joins but it's OK for now.
foreach (var filter in filters)
{
DetachedCriteria parameterRestriction = DetachedCriteria.For<ParameterValue>()
.Add(Restrictions.Eq("Value", filter.Value))
.Add(Restrictions.Eq("Parameter.Id", filter.ParameterId))
.Add(Restrictions.EqProperty("Product.Id", "rootCriteria.Id"))
.SetProjection(Projections.Property("Id"));
rootCriteria.Add(Subqueries.Exists(parameterRestriction));
}
Enable joining the same association twice with Criteria
-------------------------------------------------------
Key: HHH-879
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-879
Project: Hibernate Core
Issue Type: Improvement
Components: core
Reporter: Vladimir Bayanov
Make double joining the same association with Criteria.createCriteria possible. See:
http://forum.hibernate.org/viewtopic.php?t=931249
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira