Re: [Hibernate] collections (in one-to-many, many-to-one, etc..)

2003-01-19 Thread Max Rydahl Andersen
Ok - that surprises me a little :) I understand that if the collection instance is replaced then hibernate can not have any clue on what to do (or maybe it could load the existing relationship from the db, and do an compare ? Or is this to complex/heavy ?). But I had somewhat expected (silly me :)

[Hibernate] collections (in one-to-many, many-to-one, etc..)

2003-01-18 Thread Max Rydahl Andersen
Hi! Just need some thing explained :) How does Hibernate decide/track how to delete, update, insert tuples based on what the user has added and/or removed in the sets/lists representing many-to-one and many-to-many mappings ? (the question just came to my mind when i saw: P.S. Hibernate is

Re: [Hibernate] collections (in one-to-many, many-to-one, etc..)

2003-01-18 Thread Gavin King
Inside a Session, Hibernate keeps a snapshot of the original state of a collection and so can do removals/additions individually. However, an object that came into the session via a call to update() may have had all kind of things done to it (a PersistentCollection completely replaced with a

[Hibernate] collections (in one-to-many, many-to-one, etc..)

2003-01-18 Thread Max Rydahl Andersen
Hi! Just need some thing explained :) How does Hibernate decide/track how to delete, update, insert tuples based on what the user has added and/or removed in the sets/lists representing many-to-one and many-to-many mappings ? (the question just came to my mind when i saw: P.S. Hibernate is