3.8.2 Internal changes throws fetch failed on server

3.8.2 Internal changes throws fetch failed on server

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


Vinodonly posted on Sunday, February 14, 2010

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...

 

bniemyjski replied on Monday, February 15, 2010

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

ajj3085 replied on Monday, February 15, 2010

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.

Vinodonly replied on Tuesday, February 16, 2010

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