java - Do I need to override hashCode when using a Set with a Hibernate many-to-many relationship? -


if have many-to-many relationship hibernate, , both sides store collection in set, , set initialized hashset, need override hashcode types stored in set?

my gut says no, since hibernate replace initial hashset own set. sometimes/always/never correct?

i think should override hashcode() , equals() cause it's set , , don't break contract. sortedset use comparable instead . overriding equals , hashcode in hibernate


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -