You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception fetching/updating business object not derived from IDataPortalTarget
Version and Platform
CSLA version: 4.10.0
OS: Windows
Platform: WinForms
Code that Fails
Any fetch of a non-derived object.
Stack Trace or Exception Detail
at System.Object.GetType()
at Csla.Reflection.MethodCaller.GetCachedMethod(Object obj, String method, Boolean hasParameters, Object[] parameters) in C:\src\rdl\csla\Source\Csla.Shared\Reflection\MethodCaller.cs:line 98
at Csla.Reflection.MethodCaller.IsAsyncMethod(Object obj, String method, Boolean hasParameters, Object[] parameters) in C:\src\rdl\csla\Source\Csla.Shared\Reflection\MethodCaller.cs:line 1144
at Csla.Utilities.ThrowIfAsyncMethodOnSyncClient(Boolean isSync, Object obj, String methodName, Object[] parameters) in C:\src\rdl\csla\Source\Csla.Shared\Utilities.cs:line 415
at Csla.Server.SimpleDataPortal.<Fetch>d__1.MoveNext() in C:\src\rdl\csla\Source\Csla.Shared\Server\SimpleDataPortal.cs:line 159
at Csla.DataPortal`1.Fetch(Type objectType, Object criteria) in C:\src\rdl\csla\Source\Csla.Shared\DataPortalT.cs:line 439
at Csla.DataPortal`1.Fetch(Object criteria) in C:\src\rdl\csla\Source\Csla.Shared\DataPortalT.cs:line 424
Looks like SimpleDataPortal (Fetch, Update etc.) have an issue when target is not of type IDataPortalTarget - There are null checks but then the ThrowIfAsyncMethodOnSyncClient causes the Null Reference Exception further down then stack when GetType() is called on the now null object.
Perhaps should be passing in obj.Instance to the Utilities.ThrowIfAsyncMethodOnSyncClient method?
The text was updated successfully, but these errors were encountered:
From MarimerLLC/cslaforum#721
Describe the bug
Exception fetching/updating business object not derived from IDataPortalTarget
Version and Platform
CSLA version: 4.10.0
OS: Windows
Platform: WinForms
Code that Fails
Any fetch of a non-derived object.
Stack Trace or Exception Detail
Looks like
SimpleDataPortal
(Fetch
,Update
etc.) have an issue whentarget
is not of typeIDataPortalTarget
- There arenull
checks but then theThrowIfAsyncMethodOnSyncClient
causes the Null Reference Exception further down then stack whenGetType()
is called on the now null object.Perhaps should be passing in
obj.Instance
to theUtilities.ThrowIfAsyncMethodOnSyncClient
method?The text was updated successfully, but these errors were encountered: