|
From: Gavin K. <ga...@ap...> - 2002-10-20 17:56:54
|
> Apparently everything works fine, but from the postgres log I see that: > - the deleted object has not been deleted, but its parent_id column > has been nullified (if I recall properly you said this, because only > the update has been cascaded, not a delete, so I may expect this); Yep, you should expect this. Its discussed in the documentation. > - the other columns are updated and their id is modified... why this > extra work? The other columns are unchanged... Because, when using update(), we have to "remove" the existing collection and recreate it. (In other situations, we can get away with just changing the modified rows.) > Should I like to avoid this extra work by directly manipulating the childs, > what should I do? Should I go for a bidirectional association as in the > example provided by the documentation? Yup. Bidirectional associations are generally more efficient in Hibernate (as long as you use readonly="true"). > Ah, BTW, what's the meaning of cascade="all" read-only="true" ? If the > collection is read-only what kind of cascading is operated? readonly="true" does not change the semantics of cascade. |