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
When cteate two ContentTypes with field that named similar but with different type, GraphQL throws error when filter by this field.
GraphQL.Execution.UnhandledError: Error trying to resolve field 'numberType'.
---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such column: Text'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Dapper.SqlMapper.QueryAsync[T](IDbConnection cnn, Type effectiveType, CommandDefinition command) in /_/Dapper/SqlMapper.Async.cs:line 434
at YesSql.Store.<>c__DisplayClass44_0`2.<<ProduceAwaitedAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at YesSql.Data.WorkDispatcher`2.ScheduleAsync[TState](TKey key, TState state, Func`3 valueFactory)
at YesSql.Store.ProduceAwaitedAsync[T,TState](WorkerQueryKey key, Func`3 work, TState state)
at YesSql.Services.DefaultQuery.Query`1.ListImpl()
at YesSql.Services.DefaultQuery.Query`1.ListImpl()\
at OrchardCore.ContentManagement.GraphQL.Queries.ContentItemsFieldType.ResolveAsync(IResolveFieldContext context) in C:\\Repo\\GitHub\\OrchardCore\\src\\OrchardCore\\OrchardCore.ContentManagement.GraphQL\\Queries\\ContentItemsFieldType.cs:line 116
at GraphQL.Resolvers.FuncFieldResolver`1.<>c__DisplayClass2_0.<<-ctor>b__0>d.MoveNext() in /_/src/GraphQL/Resolvers/FuncFieldResolver.cs:line 36
--- End of stack trace from previous location ---
at GraphQL.Execution.ExecutionStrategy.ExecuteNodeAsync(ExecutionContext context, ExecutionNode node) in /_/src/GraphQL/Execution/ExecutionStrategy.cs:line 516
--- End of inner exception stack trace ---"
Orchard Core version
2.1.0
To Reproduce
Enable Content Fields Indexing (SQL) feature
Create ContentType "NumberType"
Add Number Field wih name Value
Create ContentType "StringType"
Add TExt Field wih name Value
Go To GraphQL and run query
query MyQuery {
numberType(where: {value: 123}) {
value
}
}
Logs and screenshots
When only "NumberType" created
When "NumberType" and "StringType" created
The text was updated successfully, but these errors were encountered:
I would love to see the generated SQL to understand what went wrong. It's definitely looking at the wrong table, maybe it's just missing a predicate on the index type.
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
I think this happens, because the DynamicContentFieldsIndexAliasProvider creates ambiguous alias names. Only one alias is then taken into account, which is the latest one being found.
Describe the bug
When cteate two ContentTypes with field that named similar but with different type, GraphQL throws error when filter by this field.
Orchard Core version
2.1.0
To Reproduce
Logs and screenshots
When only "NumberType" created
When "NumberType" and "StringType" created
The text was updated successfully, but these errors were encountered: