The easiest solution will again be separation of c...
# android
c
The easiest solution will again be separation of concerns. You should create a separate class for each domain it is used for. I.e. the room database data class and then a class that you create where you only have the primary key in the equals and hashcode functions. If you don’t want to do that, you can still override equals and hashCode yourself even on a data class.
r
thanks. i think i actually misread the docs about overriding equals and hashCode, because i've been laboring under the impression i wasn't supposed to do that, but now i've read again and it's just the copy method the docs mention. i'll look at separate classes for the different app layers as well
👍 1