Hello,
I am trying to use a AutoQuery service from the #servicestack:sharp-script page using sendToAutoQuery. It gives me the below exception. If I call the route /api/categories it works with filters and all.
Thanks,
Amit.
Service definition:
[Route("/api/categories")]
public class QueryCategory : QueryDb<Category>
{
}
Calling code:
{{ sendToAutoQuery({namecontains: "Moth"}, 'QueryCategory') |> htmlDump }}
Exception:
StopFilterExecutionException: StopFilterExecutionException
at ServiceStack.ServiceStackScripts.sendToAutoQuery(ScriptScopeContext scope, Object dto, String requestName, Object options) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\ServiceStackScripts.cs:line 252
at lambda_method229(Closure , Object , Object[] )
at ServiceStack.Script.PageResult.InvokeFilter(MethodInvoker invoker, ScriptMethods filter, Object[] args, String binding) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 1041
at ServiceStack.Script.JsCallExpression.Evaluate(ScriptScopeContext scope) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\JsCallExpression.cs:line 241
at ServiceStack.Script.PageResult.EvaluateAsync(PageVariableFragment var, ScriptScopeContext scope, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 684
at ServiceStack.Script.PageResult.WriteVarAsync(ScriptScopeContext scope, PageVariableFragment var, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 655
at ServiceStack.Script.ScriptTemplate.WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\ScriptLanguage.Template.cs:line 83
at ServiceStack.Script.PageResult.WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 376
at ServiceStack.Script.PageResult.WriteFragmentsAsync(ScriptScopeContext scope, IEnumerable`1 fragments, String callTrace, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 363
at ServiceStack.Script.PageResult.WritePageAsyncInternal(SharpPage page, ScriptScopeContext scope, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 567
at ServiceStack.Script.PageResult.WritePageAsync(SharpPage page, ScriptScopeContext scope, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 537
at ServiceStack.Script.ScriptTemplate.WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\ScriptLanguage.Template.cs:line 83
at ServiceStack.Script.PageResult.WritePageFragmentAsync(ScriptScopeContext scope, PageFragment fragment, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 376
at ServiceStack.Script.PageResult.WriteToAsyncInternal(Stream outputStream, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 343
at ServiceStack.Script.PageResult.WriteToAsync(Stream responseStream, CancellationToken token) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack.Common\Script\PageResult.cs:line 250
at ServiceStack.SharpPageHandler.ProcessRequestAsync(IRequest httpReq, IResponse httpRes, String operationName) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\SharpPagesFeature.cs:line 973
Inner Exceptions:
NotImplementedException: sendToAutoQuery RDBMS requires TemplateAutoQueryFilters
at ServiceStack.ServiceStackScripts.sendToAutoQuery(ScriptScopeContext scope, Object dto, String requestName, Object options) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\ServiceStackScripts.cs:line 216