public OrderDetail() { // Code generated by the BLG (in the OrderDetail.cs file) this.TableName = "OrderDetails"; this.PhysicalDbcObjectName = "Order Details"; this.PrimaryKeys = new string[] {"OrderID", "ProductID"}; // Code that I add later (also in the OrderDetail.cs file) // This can be different based on the BO // The code below is overwritten everytime I run/rerun the BLG. this.AutoSaveOnParentSaved = true; this.AutoCancelOnParentCancel = true; this.AutoDeleteOnParentDeleted = true; this.AutoEmptyOnParentAdded = true; this.ForeignParentKeyField = "OrderID"; }If there is an overriden/overloaded PreConstructor() or PostConstructor() Hook avaiable then I could write my code in it and not loose my changes.
protected override void HookParentNavigated(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
or protected override void HookParentRetrieved(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
e.g.protected override void HookPostConstructor() { // Code that I add later (in the OrderDetail.Partial.cs file) // This can be different based on the BO // This is now safe as the BLG will not overwrite this // as it is in a different physical file (OrderDetail.Partial.cs ) this.AutoSaveOnParentSaved = true; this.AutoCancelOnParentCancel = true; this.AutoDeleteOnParentDeleted = true; this.AutoEmptyOnParentAdded = true; this.ForeignParentKeyField = "OrderID"; }Sarosh