1 bug NHibernate.Profiler - incorrectly writes a log
StandardQueryCache row 109: Log.DebugFormat("returning cached query
results for: {0}", key);
2 bug NHibernate.Caches.MemCache - incorrectly calculates key
MemCacheClient row 273:
private static string ComputeHash(string fullKeyString, HashAlgorithm
hashAlgorithm)
{
byte[] bytes = Encoding.ASCII.GetBytes(fullKeyString);
byte[] computedHash = hashAlgorithm.ComputeHash(bytes);
return Convert.ToBase64String(computedHash);
}
понедельник, 1 декабря 2014 г., 13:32:07 UTC+5 пользователь Alexander
Zaytsev написал:
>
> Ivan, can you make a reproducable test?
>
> Best Regards,
> Alexander
>
> On Wed, Nov 26, 2014 at 8:28 PM, Иван Иванов <[email protected]
> <javascript:>> wrote:
>
>> NHibernate 4.0.2.GA
>>
>> Query:
>>
>> var list = session
>> .Query<City>()
>> .Cacheable()
>> .CacheMode(CacheMode.Normal)
>> .Where(x => x.Name.Contains("New"))
>> .Take(1)
>> .ToList();
>>
>> Result:
>> Cached query:
>> select TOP ('New' /* @p0 */) city0_.CITY_ID as CITY1_3_,
>> city0_.URL as URL3_,
>> city0_.NAME as NAME3_,
>> from CITY city0_
>> where city0_.NAME like ('%' + 1 /* @p1 */ + '%')
>>
>> any ideas how to fix????
>>
>> суббота, 22 ноября 2014 г., 19:10:06 UTC+5 пользователь Иван Иванов
>> написал:
>>
>>> Hi
>>>
>>> My query:
>>>
>>> query
>>> .Where(x => x.Name.Contains(value))
>>> .Take(25)
>>> .ToList();
>>>
>>> English:
>>> Cached query:
>>> select TOP (25 /* @p0 */) city0_.CITY_ID as CITY1_3_,
>>> city0_.URL as URL3_,
>>> city0_.NAME as NAME3_
>>> from CITY city0_
>>> where city0_.NAME like ('%' + 'New' /* @p1 */ + '%')
>>>
>>> Russian:
>>> select TOP ('Моск' /* @p0 */) city0_.CITY_ID as CITY1_3_,
>>> city0_.URL as URL3_,
>>> city0_.NAME as NAME3_
>>> from CITY city0_
>>> where city0_.NAME like ('%' + 25 /* @p1 */ + '%')
>>>
>>> bug?
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/nhusers.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.