Skip to content

RealmObject should overload GetHashCode #1650

@nielsenko

Description

@nielsenko

Goals

Feature request: Have RealmObject overload GetHashCode to match the overload of Equals. I
I think it i "bad" c#-style not to do so - it even gives a usage warning: CA2218: Override GetHashCode on overriding Equals on compilation (https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2218-override-gethashcode-on-overriding-equals).

For extra bonus, have GetHashCode work even if IsValid == false if possible. This will allow us to cleanup any mapped objects we may have stored in hash tables.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions