Child_Update not implemented

Child_Update not implemented

Old forum URL: forums.lhotka.net/forums/t/10516.aspx


TSF posted on Tuesday, July 12, 2011

I'm missing something here but didn't see anything in the forum that helped me figure it out.

I have an Editable Root Parent list object with a couple Editable Child properties.  Instead of using FieldManager.UpdateChildren, I'm trying to insert each child property separately because I need to pass a unique value to each one.  However, I'm getting the [Child_Update not implemented] exception.  Here is the call from the parent:

protected override void DataPortal_Insert() {

using (var dalManager = DataAccess.DalFactory.GetManager())

{

 

 

 

var dal = dalManager.GetProvider<DataAccess.ICustomerCallPlanDal>();

 

 

 

using  (BypassPropertyChecks)

{Id = dal.Insert(CustomerBranchNumber, SalesRepId);}

DataPortal.UpdateChild(MondayProperty, this, DayOfWeek.Monday);

DataPortal.UpdateChild(TuesdayProperty, this, DayOfWeek.Tuesday);

 

 

//...etc

}

}

In the editable child property object, I've got the following for the Child_Insert method:

 

 

 

 

 

 

 

private void Child_Insert(CustomerCallPlan plan, DayOfWeek dayId){

using (BypassPropertyChecks) {

 

 

 

using (var dalManager = DataAccess.DalFactory.GetManager())

{

 

 

 

var dal = dalManager.GetProvider<DataAccess.ICustomerCallPlanDayDal>();

 

 

 

using (BypassPropertyChecks)

{ Id = dal.Insert(plan.Id, dayId, StartDate, CallTime, RecurrenceInterval, Notes); }

}

}

}

It appears that my signatures match, so I'm not sure what the deal is.

[EDIT] - I forgot to include the Child_Udate method, although I don't know why this is being called since the child objects are new (and therefore the Child_Insert method should be called).  Here's the Child_Update signature:

private

 

 

void Child_Update(CustomerCallPlan plan, DayOfWeek dayId)

TSF replied on Tuesday, July 12, 2011

Nevermind on this (I think).  Part of my problem was that I had been messing with manually calling MarkNew (and overriding that with MarkClean included) which I think was making it do things I wasn't expecting.  I'm still not clear on why my method signatures seemed to match yet I was getting the errors...but I opted to go another route with my design so that I didn't need to pass in the extra parameter for the editable child properties.  I think I'm good for the moment...

Copyright (c) Marimer LLC