|
From: NHibernate J. <nh...@gm...> - 2009-08-14 06:44:56
|
Filter condition on nullable many to one should be on the join, not the where
-----------------------------------------------------------------------------
Key: NH-1930
URL: http://nhjira.koah.net/browse/NH-1930
Project: NHibernate
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.GA
Reporter: Ayende Rahien
Assignee: Ayende Rahien
Priority: Major
Using the code in NH-1919, get produces the following values for nullable property that has a filter on it:
SELECT invoice0_.id AS id1_1_,
invoice0_.otherprop AS otherprop1_1_,
invoice0_.categoryid AS categoryid1_1_,
category1_.id AS id0_0_,
category1_.validuntil AS validuntil0_0_
FROM invoice invoice0_
LEFT OUTER JOIN category category1_
ON invoice0_.categoryid = category1_.id
WHERE category1_.validuntil > @p0
AND invoice0_.id = @p1
The problem is that the filter should be applied on the join, not on the where, since it filter the parent as well as the child.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|