After reading the best parctices section for Hibernate Orm about associations and having a discussion with some of my colleagues, we started to wonder what are the best practices for performances for the different associations given if they are bidirectional?
We found an “old” post regarding Hibernate 4.3 (Hibernate Facts: Favoring bidirectional Set(s) vs List(s)) but don’t know if that applies to later (5+) Hibernate Orm implementations.
I think there is no need to ask for unidirectional since that is written in the user guide already
For unidirectional collections,
Set
s are the best choice because they generate the most efficient SQL statements. UnidirectionalList
s are less efficient than a@ManyToOne
associati