-
Notifications
You must be signed in to change notification settings - Fork 165
Closed
Labels
Description
I upgraded the SharpRepository packages of a solution from version 1.5.0.2 to version 2.0.4.3, and I noticed that the generated cache key is different between the two releases when the sql "IN" operator is used.
For example, a typical query like the following:
var collection1 = new List<int>() { 1, 2, 3 };
var collection2 = new List<int>() { 4, 5, 6 };
var results1 = repo.FindAll(x => collection1.Contains(x.Id));
var results2 = repo.FindAll(x => collection2.Contains(x.Id));should produce two different cache keys because the collection values are different, instead version 2.0.4.3 produces the same value.
So I checked the unit test code and found that a "Different_Predicate_With_Variable_Array_Will_Give_Different_Hash" unit test exists, but in the v1.5.0.2 it correctly checks that
hash1.ShouldNotEqual(hash2).Instead the newer 2.0.2 version checks
hash1.ShouldBe(hash2) that is obviously wrong.
Is this an intentional breaking change or just a bug?