-
Notifications
You must be signed in to change notification settings - Fork 453
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
Sql.ExtensionAttribute chain bug #2418
Labels
Milestone
Comments
Please share your extension and simple model |
Simplified everything as I could.
Extension:
Test:
|
sdanyliv
added a commit
that referenced
this issue
Aug 18, 2020
MaceWindu
added a commit
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
After upgrading version 3.0.1 from 2.9.8, some of my tests failed. I have used some extension methods (via Sql.ExtensionAttribute), that allowed me to partially update JSON column (using JSON_MODIFY).
In this extension I used my own CallBuilderType, that wraps previous calls (using ISqExtensionBuilder.GetExpression())
JSON_MODIFY({source}, {path}, {value})
- where {source} is previous call resultAnd it used like this:
It was generating an update query like this:
SomeColumn=JSON_MODIFY(JSON_MODIFY(SomeColumn, '$.SomeProperty', 10), '$.AnotherProperty', 17)
But after update, it only generates query only for the first call:
SomeColumn=JSON_MODIFY(SomeColumn, '$.SomeProperty', 10)
I think it has something to do with this commit d8e6920, especially with this change:
Now, the main
SqlExtensionParam
, taken from the end of the chain (ifChainPrecedence
is not specified), whereas in previous versions it was taken from the beginning.It should be noted that all calls appear to be correct, it is just that the main
SqlExtensionParam
is always the first call.Environment details
linq2db version: 3.0.1
Database Server: Sql Server
.NET Framework: .Net Core 3.1, net472
The text was updated successfully, but these errors were encountered: