How can i exclude data class field from hash code ...
# getting-started
s
How can i exclude data class field from hash code and equals?
c
to do so requires overriding equals and hashcode.
j
Don't put the field in the constructor
plus one 2
But It'll also be excluded from copy and toString
s
What about if it is in a secondary connector?
j
Is only included if it's in the primary constructor
👍 1