Can someone explain me why using the annotation @Fetch(FetchMode.SELECT) allows me to use Lists instead of Sets? Which is the difference by using other fetchmode types like SUBSELECT?
Here below a piece of exmple code:
class One{
..
@Fetch(FetchMode.SELECT)
@OneToMany(mappedBy="one", fetch = FetchType.EAGER, ... )
private List<Something> listOne = new ArrayList<Something>();
@Fetch(FetchMode.SELECT)
@OneToMany(mappedBy="one", fetch = FetchType.EAGER, ... )
private List<SomethingElse> listTwo = new ArrayList<SomethingElse>();
...
}
In this way it works but I'd like to know why....I found other discussion with alternatives solutions but this one wasn't the preferred one...