Ok I've tested it on MySQL and MS-SQL and there it doesn't matter. Your Test
wokrs on my machine.
It seems, this is an Oracle sepcific thing. Mybe I know how to fix it. Give me
a second :-D
> It matters on Oracle database:
>
> select 'X' from dual where lower('ABCDE') like 'A%'
>
> Does not return a row, the like comparison fails.
>
>
>
>
> On Aug 21, 2:31 pm, armin-landscheidt <[email protected]> wrote:
>
>> If I remember right, it doesn't matter if you write 'C%' or 'c%' but I will
>> check it.
>>
>>
>>
>>
>>> Based on your tests for NH-1902, then this test should pass, too.
>>>
>>> I can't seem to get NHibernate to build and test on my machine. Is
>>> this something you can run??
>>>
>>> [Test]
>>> public void
>>> TestEnableLikeAndCaseInsensitiveWithMatchmodeAnywhere()
>>> {
>>> using (ISession s = OpenSession())
>>> using (ITransaction t = s.BeginTransaction()) {
>>> Componentizable master = GetMaster("BERN", null,
>>> null);
>>> ICriteria crit =
>>> s.CreateCriteria(typeof(Componentizable));
>>> Example ex = Example.Create(master).EnableLike
>>> (MatchMode.Anywhere).IgnoreCase();
>>> crit.Add(ex);
>>> IList result = crit.List();
>>> Assert.IsNotNull(result);
>>> Assert.AreEqual(3, result.Count);
>>> t.Commit();
>>> }
>>> }
>>>
>>> On Aug 21, 11:52 am, Joe <[email protected]> wrote:
>>>
>>>> Oops, I celebrated too soon!
>>>> I grabbed the latest build from NH TeamCity and at first it seemed
>>>> fixed.
>>>>
>>>> But, there is a problem still with case.
>>>>
>>>> If I set a string property to "C", the parameter generated is "C%",
>>>> but it should be "c%" because the where clause is: "WHERE (lower
>>>> (this_.description) like ?)"
>>>>
>>>> "C%" is not going to match anything returned by a lower() function.
>>>>
>>>> Armin, did you have this problem??
>>>>
>>>> On Aug 21, 10:26 am, Joe <[email protected]> wrote:
>>>>
>>>>> Thanks you guys, I was pulling my hair out!
>>>>>
>>>>> On Aug 21, 4:15 am, Armin Landscheidt <[email protected]> wrote:
>>>>>
>>>>>> http://nhjira.koah.net/browse/NH-1902
>>>>>>
>>>>>> On Aug 21, 1:02 pm, Saijado <[email protected]> wrote:
>>>>>>
>>>>>>> This Bug should be fixed in Version 2.1.1 I've send a patch to JIRA
>>>>>>> some weeks ago. Search in JIRA for "Example" and you should find my
>>>>>>> post.
>>>>>>>
>>>>>>> -- Armin
>>>>>>>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
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
-~----------~----~----~----~------~----~------~--~---