-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null reference exception when running UpdateFromQuery #476
Comments
I can confirm this broke exactly in release: 6.13.0 |
When this was working the outputed SQL was quite acceptable:
This totally looks like a regresion in the 6.13.0 release. |
This does not work:
But if you set the legacy behaviour directly on the operation it does work:
|
Hello @david-garcia-garcia , The v6.13.17 has been released. The initial issue should now be fixed. My developer also fixed the Let me know if everything works as expected. Best Regards, Jon |
Description
Null reference exception when running UpdateFromQuery
dcs.CurrentContext.SABENTIS_COMPANY .Where(i => i.cif.Contains(" ")) .UpdateFromQuery(i => new SABENTIS_COMPANY() { cif = i.cif.Replace(" ", string.Empty) });
Exception
Exception message: {"Object reference not set to an instance of an object."}
Stack trace:
at Z.EntityFramework.Extensions.BatchUpdate.<>c.(MemberExpression )
at
1.Visit(Expression expression) at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes) at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node) at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at
1.Visit(Expression expression)at Z.EntityFramework.Extensions.BatchUpdate.ResolveUpdateFromQueryDictValuesMemberInit(Dictionary
2 dictValues, Type entityType, MemberInitExpression memberInitExpression, String prefix) at Z.EntityFramework.Extensions.BatchUpdate.ResolveUpdateFromQueryDictValues[T](Expression
1 updateFactory)at Z.EntityFramework.Extensions.BatchUpdate.[](IQueryable
1 , Expression
1 , SchemaEntityType1 ) at Z.EntityFramework.Extensions.BatchUpdate.Execute[T](IQueryable
1 query, Expression1 updateFactory) at DbContextExtensions.[](IQueryable
1 , Expression1 , Action
1 , Boolean )at DbContextExtensions.UpdateFromQuery[TEntity](IQueryable
1 query, Expression
1 updateExpression, Action1 bulkOperationFactory) at DbContextExtensions.UpdateFromQuery[TEntity](IQueryable
1 query, Expression`1 updateExpression)Fiddle or Project (Optional)
https://github.com/david-garcia-garcia/zzzbrokenmerge
Test for this specific issue in the project is:
TestMethod3
Further technical details
The text was updated successfully, but these errors were encountered: