How to work with reference set?

I have been reading docs but have not understood so far. Let me use an example: a company has employees who can be assigned to "Bonus salary" group, meaning they are still employees but also belongs to another group (entity) which hold references so it gets updated automatically. My model would be as follows (entities): Company<----Employee [1-* as a Company can have multiple employees] Company---BonusPlan [1-1 as a Company has only one bonus plan]. The problem I want to solve is that I need to be able to add employees to BonusPlan "by reference" (as it were), e.g. when an employee's data changes or he/she gets deleted, it will be reflected in the BonusPlan. In SQL I would simply put to BonusPlan IDs and retrieve the data but not sure how to do in Mendix with these reference sets.
1 answers

You can simply create a reference from your bonusplan to your employee and change it to reference set. The rest is then taken care of by itself. If the employee were ever to get deleted it will automatically be removed from your bonusplan aswell.

To use a reference set you need a refrence set selector, this widget will allow you to add/remove employees from your set by hand.