Nov 8, 2018

JPA Collection properties type: Set vs. List

If you don't allow duplicate and never care about order, use a Set. When for some reason order is important (ordered list, ordering by date, etc.), then a List, or else you need SortedSet.