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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -