**[Shiv Veeram](https://jira.spring.io/secure/ViewProfile.jspa?name=shivaveeram)** opened **[DATAMONGO-1666](https://jira.spring.io/browse/DATAMONGO-1666?redirect=false)** and commented ```java public class Squad { @DBRef`monospaced text` private final Set<Player> players; public Squad(Set<Player> players) { this.players = ImmutableSet.copyOf(Objects.requireNonNull(players)); } public Set<Player> getPlayers() { return players; } } ``` The above code fails with java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_121] Both the setter based and field based injection works as expected but we want to make the set immutable. Can somebody explain why the constructor based style is not working ? --- **Affects:** 2.0 M1 (Kay), 1.10.1 (Ingalls SR1) **Reference URL:** http://stackoverflow.com/questions/43294837/referencing-documents-with-dbref-annotation-on-a-set **Referenced from:** pull request https://github.com/spring-projects/spring-data-mongodb/pull/457 **Backported to:** [1.10.2 (Ingalls SR2)](https://github.com/spring-projects/spring-data-mongodb/milestone/85?closed=1)