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.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/dDRakRE_E-MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to