OneToMany binding and representation in form

Hello,

I am confused about the Binding Topic in Vaadin 8. Hopefully somebody can explain this to me.

I have two entities, for example Company and Employee. The Company Entity has a OneToMany relation to Employee.

How will the binding look for the using of Vaadin 8 + Spring and what are the possibilities to get this into an Form? Maybe with an AddEmployee-Button? How would be this implemented?

Thanks for any help.

Regards,
Yacin

depends on you business case. what are the requirements?

Administrator workflow is:

  1. create company
  2. navigate to company edit view
  3. manage Employes.

You can manage this relation also from employee side. For example employee goes to his details and choose a different compnay his is working for.

May be employee register him self on a intranet application and choose his department/company later.

mostly this relation will have some validity so you model it like

Person → Employment ← Company

where employment will have some valid period.

As i said depends on your requirements.