Roel De Nijs wrote:Here you'll find a detailed example of a ManyToMany relationship.
Is it intentional that you use driver_series_stats_xref as the join table, but that you provide the create script of another table?
Samar Land wrote:I have this issue fixed by deleting the add to list line in myService.
driver.getListOfVehicles().add(vehicle);
Samar Land wrote:Hope this will be useful for other people.
Samar Land wrote:well, it's a many to many relationship, I created a new Domain, Dao,Service for the DriverVehicle and I called the addOrUpdate method in DriverService to save the vehicle. (I have the vehicle as a dropdown list in my JSP) so All what I have to do is passing the vehicle id and then save the relation in DriverVehicl table)
I would expect to be able to create a many-to-many mapping without these additional classes, just using the Driver and Vehicle entities with an appropriate mapping
Samar Land wrote:I had to create the other classes to handle an extra columns, but my issue was before that.
You got style baby! More than this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|