Yes, good point :-) Thanks! One more question - on save of object A will it update version number/ timestamp of children B, having cascade set to "save-update" (if modification was done only in object A)? Same for parent relations.
Piotr On 22 Lip, 23:26, Diego Mijelshon <[email protected]> wrote: > If you load an object A with many B children and modify one of them, it is > updated on flush regardless of cascade settings. > If you don't want to update an object, don't modify it. > > Diego > > On Thu, Jul 22, 2010 at 17:11, powro <[email protected]> wrote: > > The problem i want to solve here is to persist quite complicated > > object graph (5-7 levels). Here persist means - save the root entity > > along with all its child collections and relations. Cascades shouldn't > > be applied to any updates of any element of this graph. > > My first choice was to look what NH offers in this matter (instead of > > writting my own "saver"). > > > I fully understand the meaning of cascades in terms of lifetime of > > related objects. Unfortunatelly enabling this permanently can > > seriously impact the performance. > > > On 22 Lip, 20:53, Diego Mijelshon <[email protected]> wrote: > > > I believe you are misunderstanding what the cascade function does. > > > > Diego > > > > On Thu, Jul 22, 2010 at 12:28, powro <[email protected]> wrote: > > > > Is is possible to change cascades defined in the mappings in the > > > > runtime? I want to use this great feature of NH, but only in certain > > > > places of the code. Basically i need to cascade saves and prevent > > > > updates. > > > > > It would be great if i could use the cascades programatically as well. > > > > Is it supported? > > > > > Thanks for your support! > > > > Piotr > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "nhusers" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]<nhusers%[email protected]> > > <nhusers%[email protected]<nhusers%[email protected]> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/nhusers?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
