I've spent a fair amount of time reading documentation and googling, and while I have found information on selecting objects with one-to- many relationships, I have yet to find anything on updating and deleting.

So, if I have

class Person {
        int id;
        String name;
        List<Car> cars;
}

class Person {
        int id;
        String name;
}

And I have 3 tables

person (
        id,
        name
)

car (
        id,
        name
)

person_x_car (
        person_id
        car_id
)

How is it that I go about

1) Updating a Person who has changes to their cars
2) Deleting a Person and subsequently deleting the relevant rows in person_x_car

Thanks

Reply via email to