posted 11 years ago
Dear All,
I am having trouble implementing Many-to-one mapping in hibernate. I have the done the following:
I have a table called Users and another table called Rank. The relationship between the two is that many users can have the same rank. So it is Many-to-One mapping. The Users and Rank tables are as follows:
The mapping files are as follows:
I am using hibernate template to insert the values in the Users table. The rank is a combobox item in the registration form. Each rank has an ID associated with it which has to be inserted in the users table's 'rankid' column.
The code for this is as follows:
My Form Controller is as follows:
When ever i try to register a new user, it is not calling the form controller. Am I doing something wrong?
Please help.
Thank you.