I got stuck with the application and I was hoping someone could help me. I have a web application using Spring MVC and AngularJS, currently I have everything working as it should. My aim is to have a select method inside trainee table and in the select method retrieve values from another table and save it as a foreign key.
We have Table1 and Table2, Table1 has ManyToOne relationship with Table2.
The view displays Table1 content
When editing Table1 content I would like to see Table2 column (e.g. name)
After selecting a column and pressing save, it should update the Table1 foreignkey with selected contents from Table2 primary key.
Would anyone help me to develop this? I ran out of options. If it was OneToMany relationship, I could use List, I can't seem to get controllers passing information to each other. I would be very grateful.