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
Projection with a navigation property being null throws System.ArgumentNullException: Value cannot be null. (Parameter 'source')
Assemblies affected
This bug were introduced in ODL Client 8.0.0.rc.1 and is still present in ODL 8.0.0. ODL Client 8.0.0.preview.3 and earlier does not have this issue.
Reproduce steps
Imagine a model with a Person having a navigation property Spouse of type Person that can be null. Then the error can be reproduced with this code (provided that you have people without spouses in your store)...
var q = from p in ctx.People
where p.Spouse == null
select new Person
{
ID = p.ID,
Spouse = p.Spouse
};
var results = q.ToList();
Expected result
Results are materialized correctly having null as navigation property value.
Actual result
An exception is thrown when the response is materialized...
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
ODataEntityMaterializer.ProjectionValueForPath(MaterializerEntry entry, Type expectedType, ProjectionPath path)
ODataEntityMaterializerInvoker.ProjectionValueForPath(Object materializer, Object entry, Type expectedType, Object path)
lambda_method3885(Closure, Object, Object, Type)
ODataEntityMaterializer.ProjectionInitializeEntity(ODataEntityMaterializer materializer, MaterializerEntry entry, Type expectedType, Type resultType, String[] properties, Func4[] propertyValues) lambda_method3886(Closure, Object, Object, Type) ProjectionPlan.Run(ODataEntityMaterializer materializer, ODataResource entry, Type expectedType) ODataEntityMaterializer.ReadImplementation() ObjectMaterializer.MoveNextInternal() ObjectMaterializer.MoveNext() Enumerable.CastIterator[TResult](IEnumerable source)+MoveNext() List1.ctor(IEnumerable1 collection) Enumerable.ToList[TSource](IEnumerable1 source)
Additional detail
The text was updated successfully, but these errors were encountered:
Projection with a navigation property being null throws
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
Assemblies affected
This bug were introduced in ODL Client 8.0.0.rc.1 and is still present in ODL 8.0.0. ODL Client 8.0.0.preview.3 and earlier does not have this issue.
Reproduce steps
Imagine a model with a Person having a navigation property Spouse of type Person that can be null. Then the error can be reproduced with this code (provided that you have people without spouses in your store)...
Expected result
Results are materialized correctly having null as navigation property value.
Actual result
An exception is thrown when the response is materialized...
ODataEntityMaterializer.ProjectionValueForPath(MaterializerEntry entry, Type expectedType, ProjectionPath path)
ODataEntityMaterializerInvoker.ProjectionValueForPath(Object materializer, Object entry, Type expectedType, Object path)
lambda_method3885(Closure, Object, Object, Type)
ODataEntityMaterializer.ProjectionInitializeEntity(ODataEntityMaterializer materializer, MaterializerEntry entry, Type expectedType, Type resultType, String[] properties, Func
4[] propertyValues) lambda_method3886(Closure, Object, Object, Type) ProjectionPlan.Run(ODataEntityMaterializer materializer, ODataResource entry, Type expectedType) ODataEntityMaterializer.ReadImplementation() ObjectMaterializer.MoveNextInternal() ObjectMaterializer.MoveNext() Enumerable.CastIterator[TResult](IEnumerable source)+MoveNext() List
1.ctor(IEnumerable1 collection) Enumerable.ToList[TSource](IEnumerable
1 source)Additional detail
The text was updated successfully, but these errors were encountered: