Skip to content

Commit aa37caf

Browse files
committed
NH-3638: Use real equality instead of hash code for PropertyPath equality. Running the test code in NH-3638 demonstrates that the bug disappears with this change. No unit test committed since reproduction requires relatively complex long-running scenario.
1 parent 54fe758 commit aa37caf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NHibernate/Mapping/ByCode/PropertyPath.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public bool Equals(PropertyPath other)
6363
{
6464
return true;
6565
}
66-
return hashCode == other.GetHashCode();
66+
return (ReferenceEquals(previousPath, null) && ReferenceEquals(other.previousPath, null) || !ReferenceEquals(previousPath, null) && previousPath.Equals(other.previousPath)) && localMember.Equals(other.localMember);
6767
}
6868

6969
public override int GetHashCode()

0 commit comments

Comments
 (0)