Hi folks,
I am facing some strange issue, I have a user table(use class) and a country table(country class). An user may have N number of countries. Hence, I have added a List of countries in the user class with the getter and setter method. In the table I have made the country_id as foreign key in user table. And, I have a @OneToMany on the user class.
Now when I try to persist the User class with a collection of countries in it, I see that the countries are never inserted :( I set two countries and insert an user. So I should be able to see 2 user rows with different countries. But I just see one.
I am just puzzled. Am I doing something wrong here?
Cheers, J