i just moved from 3.6.3 to 3.8.2 and noticed that some Internal changes now throws error fetch failed on server..
This is occuring in child collections where there are no records..
private
void Child_Fetch(DataRow [] rows)
Previously this was being called I think with blank collection but now if there are no records then it is called with null value which throws the error..
can anybody cfm this change in csla...
Hello,
I didn't notice this change, the default behavior of the fetch is to throw an exception if no records exist. This will return a DataPortalException and the inner exception will contain the actual exception message. Do you have a unit test that works in 3.6.3 but fails in 3.8.2? Also could you provide a stack trace \ snippet of the child fetch.
What does the definition of your child property look like?
Thanks
-Blake Niemyjski
Is this the behavior you're seeing? http://forums.lhotka.net/forums/t/8410.aspx
If it is, to work around it I would wrap the DataRow array in a SingleCriteria<T, D> class.
yes, this is exactly what is coming.. in the post you have refered the final answer is not given bcos before calling the dataportal fetch passed param is not null but array with 0 values.. but when it is called then auto this array is changed to null.. Will this remain as it is in future csla versions also ?
For the time being, i'm doing a null checking in fetch to avoid errors..
Copyright (c) Marimer LLC