|
From: Patrick E. (JIRA) <nh...@gm...> - 2010-10-31 04:44:46
|
[ http://216.121.112.228/browse/NH-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20086#action_20086 ]
Patrick Earl commented on NH-2099:
----------------------------------
If your column stores case sensitive data, you can change the collation on the column itself. Then any queries will behave as expected automatically. Since other databases are case sensitive by default, I would argue that you should use the database setting to make the search case sensitive by default. It might be difficult for NHibernate to guess which collation the user is actually looking for. At the very least, it would need to be dialect specific.
If you use SQL Server Management Studio, you can set the Collation setting in the column properties within the table designer.
> Linq Expressions and case sensitivity
> -------------------------------------
>
> Key: NH-2099
> URL: http://216.121.112.228/browse/NH-2099
> Project: NHibernate
> Issue Type: New Feature
> Components: Linq Provider
> Affects Versions: 3.0.0.Alpha1
> Reporter: Jose F. Romaniello
> Priority: Minor
>
> The following query:
> persons.Where(p => p.Nombre.StartsWith("a"))
> in objects is case-sensitive. And I would like in nhibernate be case sensitive too.
> otherwise:
> persons.Where(p => p.Nombre.StartsWith("a", StringComparison.OrdinalIgnoreCase))
> In sql server it is possible to change the "coalesce" in the where statement. I don't know for other providers.
> The same for others string operators.
--
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
|