I am running into similar situation as this post. My pseudo code is
string hql = "select ai from AreaInfo as ai where ai.PhoneSegment is substring of :InputPhoneNumber";
Using like wouldn't do the trick because what Like is doing is
string hql = "select ai from AreaInfo as ai where :InputPhoneNumber is substring of ai.PhoneSegment";
So, what is the correct syntax to perform this task? My environment is Castle ActiveRecord on top of NHibernate. Thanks in advance.