Hello, I am new to Hibernate and I really am enjoying it so far. I do have a question though. So if you have a table A and table B and there is a one-to-many relationship from A to B. So there is a foreign key in B that links to A's primary key. If I get an object in A through my session, the tableADAO object will have a getter for the list of tableBDAO objects. So say that this list of tableBDAO objects, daoList, has 5 objects in it. So I remove a tableBDAO object from that list and save the tableADAO object to the session and commit my session. Why doesn't hibernate recognize that I only want 4 tableBDAO objects in the database now and automatically remove the unwanted tableBDAO object from the database? Right now I have to do a delete in the session to remove the object. I don't know if there is something that I am missing? Thanks,
Dwain
|