cidico
unread,Dec 1, 2011, 8:27:29 AM12/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
Hi,
I'm using HQL to build a query and I found that NHibernate is cutting off my precedente orders.
For example my query is this
" from Wharehouse wh
left outer join wh.CoverageArea as ca
where :zipCode BETWEEN ca.StartCEP and (ca.StartCEP + (ca.EndCEP - ca.StartCEP))"
but when executed, the result sql is this:
select wharehouse0_.WharehouseId as Wharehou1_24_,
wharehouse0_.Name as Name24_,
wharehouse0_.ErpCode as ErpCode24_
from Wharehouses wharehouse0_
left outer join WharehouseCoverageArea coveragear1_
on wharehouse0_.WharehouseId = coveragear1_.WharehouseId
where 91260010 /* @p0 */ between coveragear1_.StartCEP and coveragear1_.StartCEP + coveragear1_.EndCEP - coveragear1_.StartCEP;
I'm not saying that the sql query is wrong (the result is ok), but why the NH does not keep my "(" and ")" ?
It could lead me to troubles when doing math operations in complex queries.