Reference set selector not working for new entities

Hi, given adding employees to a project using a reference set selector, when adding employees to a new project, then associations are not saved in db. However the reference selector works properly when an existing project is changed. The association is a reference set with owner both. Is this a bug in the reference selector or a feature of the autocommit ?
1 answers

Anyways. Created this workaround when saving a project.