|
From: Denis (JIRA) <nh...@gm...> - 2011-05-11 09:34:00
|
[ http://216.121.112.228/browse/NH-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21047#action_21047 ]
Denis commented on NH-2546:
---------------------------
I'm wondering why the issue is not in the 3.1 release and why the priority is 'Minor'?
Does it mean that nobody uses 'Like' criteria?
> 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: Minor
> Attachments: NH-2546.patch
>
>
> 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
|