Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HookPreSave not hooked with child/related save?
Message
From
12/08/2008 17:50:24
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01338239
Message ID:
01338452
Views:
15
>Larry,
>
>>just wondering if anyone could confirm the HookPreSave works when saving a child record. I have a HookPreSave(DataTable dt) in my childobject.partial, which works fine for other objects just not either of my child objects (I have two different forms saving master and child, both childs don't call this routine). I have done the RegisterChildBizObj and EntityCentric is false.
>
>If the child object is saving, then it Save hook methods should be firing. Make sure you have the child business object’s AutoSaveOnParentSaved property to true (you can set this at the ABusinessObject level if you normally want child objects to behave this way).
>
>Best Regards,

Hi Kevin,
I checked in the sample app OrderDetail.Partial.cs, and it has this.AutoSaveOnParentSaved = true;. Also note the data does get saved, but the HookPreSave routine isn't getting called.

Same with my own app, AutoSaveOnParentSaved is true and the data is getting saved, the parent HookPreSave gets called but the child HookPreSave doesn't.

thanks,
-Larry
Previous
Reply
Map
View

Click here to load this message in the networking platform