From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 05:04:49
|
[ http://216.121.112.228/browse/NH-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2614. --------------------------- Resolution: Won't Fix > Have HQL Support "Where Property = null" > ---------------------------------------- > > Key: NH-2614 > URL: http://216.121.112.228/browse/NH-2614 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 3.2.0 > Reporter: Ricardo Peres > > HQL, as SQL, only allows comparison with null with syntax "where property is null" instead of the ordinary "where property = null". Sometimes, we do not know if the value that we want to filter by is null or not, when we use properties, for example: > var q = session.Query("from MyEntity e where e.Property = :value").SetProperty("value", someValue); > If someValue is null, we would have to rewrite the query as: > var q = session.Query("from MyEntity e where e.Property is null"); > I believe it would be helpful if HQL could support the same syntax for null and non-null values. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |