From: Denis (JIRA) <nh...@gm...> - 2011-02-23 16:01:37
|
MSSQL Like criteria doesn't work if expression length is more then column length -------------------------------------------------------------------------------- Key: NH-2546 URL: http://216.121.112.228/browse/NH-2546 Project: NHibernate Issue Type: Bug Components: DataProviders / Dialects Affects Versions: 3.0.0.GA Reporter: Denis Priority: Critical Consider the following situation: mapping file contains the following property <property name="PostalCode" column="postal_code" type="String(10)" not-null="true"/> When I apply the following restriction Restrictions.Like("PostalCode", "%9108[ -]MC%") it doesn't work as expected. Generated query looks like this: SELECT count(*) as y0_ FROM PostalCodes this_ WHERE this_.postal_code like @p0;@p0 = '%9108[ -]MC%' [Type: String (10)] Parameter value length ('%9108[ -]MC%') is 12 symbols and it is correct expression but the value is cutted to '%9108[ -]M' which is not correct. -- 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 |