Loading Child List Fails with "ChildDataPortal.Fetch failed on the server"

Loading Child List Fails with "ChildDataPortal.Fetch failed on the server"

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


nj609eagle posted on Wednesday, February 04, 2009

I'm new to CSLA and am trying to follow the book with along with some code generation to assit my learning.
In my root object i make the call to the Fetch where I load my child List property:

LoadProperty(Of Line18DetailsList)(Line18DetailsProperty, LAFAP.Library.Line18DetailsList.GetLine18detailsByApplicationID(Me.ApplicationID))

The factory methong GetLine18detailsByApplicationID has the call to DataPortal.FetchChild(Of Line18DetailsList)(criteria)

In the data Access Region I have

Private Overloads Sub Child_fetch(ByVal criteria As SelectCriteria)

which makes the calls out to the database to get the rows that below to the list passing the Safedatareader to the private Fetch Sub

If I change the Child_Fetch to DataPortal_Fetch it works, but what is listed above fails on the call DataPortal.FetchChild(Of Line18DetailsList)(criteria).

 

 

RockfordLhotka replied on Thursday, February 05, 2009

Your root object must have a DataPortal_Fetch() method.

Or to put it differently - a call to DataPortal.Fetch() is always translated into a call to DataPortal_Fetch().

A call to DataPortal.FetchChild() is always translated into a call to Child_Fetch().

It could be a typo, but your code has Child_fetch(), not Child_Fetch() - and I'm sure the method name is case sensitive.

Copyright (c) Marimer LLC