Refer to http://www.avaje.org/topic-172.html
public Set<Usergroup> getGroups() { if ( groups == null ) { final BeanSet<Usergroup> set = new BeanSet<Usergroup>(); set.setModifyListening(BeanCollection.ModifyListenMode.ALL); setGroups(set); } return groups; }
Consider changing the enhancer to automatically add the "null protection" type code for *ToMany properties.
You can specify checkNullManyFields=false to explicitly turn off this enhancement option.
For example: To turn off the checkNullManyFields and use debug level of 4 for enhancement ...
debug=4;checkNullManyFields=false