ravendb linq query does not use overriden equals method? <p>This works :</p> <pre><code>IQueryable&lt;Record&gt; query = _db.Query&lt;Record&gt;() .Statistics(out stats) .Where(r =&gt; r.Keywords.Any( k =&gt; k.Value.Equals(searchInputModel.Keyword.Value))); </code></pre> <p>but this doesn't</p> <pre><code> IQueryable&lt;Record&gt; queryBorked = _db.Query&lt;Record&gt;() .Statistics(out stats) .Where(r =&gt; r.Keywords.Any( k =&gt; k.Equals(searchInputModel.Keyword))); </code></pre> <p>even though I have overridden equals and hashcode for the Keyword class like below, so only value is checked for equality :</p> <pre><code>protected bool Equals(Keyword other) { return string.Equals(Value, other.Value, StringComparison.InvariantCultureIgnoreCase); } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != this.GetType()) return false; return Equals((Keyword) obj); } </code></pre> <p>And hashcode :</p> <pre><code>public override int GetHashCode() { unchecked { return (Value.ToLower().GetHashCode() * 397); //return (Value.ToLower().GetHashCode()*397) ^ Vocab.ToLower().GetHashCode(); } } </code></pre> <p>Does ravendb use a different equality check ?</p>