-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
.Contains("") operation Exception #49
Comments
i think it's a mysql ef core problem? |
@jogibear9988 Seems so, can we log an issue somewhere on this? |
i think so. if it works with sqlserver and linq2objects, i don't think it's a dynamic linq error |
Closing... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an error when I use in my query Where(Name.Contains("value")) but only when I use MySql, with SqlServer works fine.
Error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+ '%'' at line 3
I think the problem is how the sql query is sent to the database:
select * from entity where Name like '%' + 'value' + '%'
The same happens with the StartsWith() and the EndsWith() operations.
Is this a problem with the database provider?
Versions:
MySql: "MySql.Data.EntityFrameworkCore": "7.0.5-IR21"
"MySql.Data": "7.0.5-IR21"
"System.Linq.Dynamic.Core": "1.0.6.5"
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0"
The stacktrace:
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary
2 parameterValues, Boolean openConnection, Boolean closeConnection) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary
2 parameterValues, Boolean manageConnection)at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3
1.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__15
2.MoveNext()at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor
1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)at System.Linq.Dynamic.Core.DynamicEnumerableExtensions.ToDynamicList(IEnumerable source)
at DatesAndRates.Host.Controllers.ProviderController.Filtros(jqGridViewModel jqGridParameters)
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext()
The text was updated successfully, but these errors were encountered: