Quantcast
Viewing all articles
Browse latest Browse all 764

Child_Fetch not working as expected

Using Csla 4.5

 

I recently added an additional Child_Update method to a BusinessBase to support its Parent BusinessListBase in bulk saving.  However, this seemed to of introduced a bug in our system.  It looks like if you have two Child_Update methods, the parameterless one won't be called.  Even if you specify the DataPortal.UpdateChild with no additional parameters beyond the Child Object.

............

//No longer called

private void Child_Update() {}

//Newly added

private void Child_Update(ParentBusinessBase parent) {}

...............

//Calls Child_Update(ParentBusinessBase parent)????

DataPortal.UpdateChild(ReadProperty(ChildProperty));

//Calls Child_Update(ParentBusinessBase parent) --- as expected

DataPortal.UpdateChild(ReadProperty(ChildProperty), this);

 

I've attached a small code sample which demonstrates the above.  Is this a bug?


Viewing all articles
Browse latest Browse all 764

Trending Articles