Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HookPreSave not hooked with child/related save?
Message
De
12/08/2008 17:50:24
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01338239
Message ID:
01338452
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform