{ "IsDefaultCulture": false, "Name": "sv", "Culture": "sv", "Trie": { "/": { "ControllerName": "Home", "Name": "Hem", "PageId": "homes/290-A" }, "/om-oss": { "ControllerName": "About", "Name": "Om oss", "PageId": "abouts/290-A" }, "/om-oss-2": { "Name": "Om oss 2", "PageId": "abouts/321-A", "ControllerName": "About" } }, "@metadata": { "@collection": "Sites", "Raven-Clr-Type": "src.Site, src" }}
PatchCommandData patchCommandData = new PatchCommandData($"sites/{requestCultureFeature.RequestCulture.Culture.Name}", null, new PatchRequest { Script = @"this.Trie.RemoveWhere(function(node) {{ return node.PageId == args.PageId; }});", Values = { { "PageId", $"{args.DocumentId}" } } }, null);
((IAsyncDocumentSession)args.Session).Advanced.Defer(patchCommandData);
An unhandled exception occurred while processing the request.JavaScriptException: Raven.Client.Exceptions.Documents.Patching.JavaScriptException: At 0:4{"name":"TypeError","message":"Object has no method 'RemoveWhere'","callstack":" at RemoveWhere(Esprima.Ast.FunctionExpression) @ 0:4\n at call(doc, args) @ 4:11\n"} ---> Jint.Runtime.JavaScriptException: Object has no method 'RemoveWhere'at Jint.Native.Function.ScriptFunctionInstance.Call(JsValue thisArg, JsValue[] arguments)at Raven.Server.Documents.Patch.ScriptRunner.SingleRun.Run(DocumentsOperationContext ctx, String method, Object[] args) in C:\work\ravendb-4.0\src\Raven.Server\Documents\Patch\ScriptRunner.cs:line 587--- End of inner exception stack trace ---at Raven.Server.Documents.Patch.ScriptRunner.SingleRun.Run(DocumentsOperationContext ctx, String method, Object[] args) in C:\work\ravendb-4.0\src\Raven.Server\Documents\Patch\ScriptRunner.cs:line 601at Raven.Server.Documents.Patch.PatchDocumentCommand.Execute(DocumentsOperationContext context) in C:\work\ravendb-4.0\src\Raven.Server\Documents\Patch\PatchDocumentCommand.cs:line 140at Raven.Server.Documents.Handlers.BatchHandler.MergedBatchCommand.Execute(DocumentsOperationContext context) in C:\work\ravendb-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 344at Raven.Server.Documents.TransactionOperationsMerger.ExecutePendingOperationsInTransaction(List`1 pendingOps, DocumentsOperationContext context, Task previousOperation, DurationMeasurement& meter) in C:\work\ravendb-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 597at Raven.Server.Documents.TransactionOperationsMerger.MergeTransactionsOnce() in C:\work\ravendb-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 307--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Raven.Server.Documents.TransactionOperationsMerger.<Enqueue>d__22.MoveNext() in C:\work\ravendb-4.0\src\Raven.Server\Documents\TransactionOperationsMerger.cs:line 89--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Raven.Server.Documents.Handlers.BatchHandler.<BulkDocs>d__0.MoveNext() in C:\work\ravendb-4.0\src\Raven.Server\Documents\Handlers\BatchHandler.cs:line 54--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Raven.Server.Routing.RequestRouter.<HandlePath>d__6.MoveNext() in C:\work\ravendb-4.0\src\Raven.Server\Routing\RequestRouter.cs:line 97--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()at Raven.Server.RavenServerStartup.<RequestHandler>d__11.MoveNext() in C:\work\ravendb-4.0\src\Raven.Server\RavenServerStartup.cs:line 159Raven.Client.Exceptions.ExceptionDispatcher+<Throw>d__3.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Exceptions\ExceptionDispatcher.cs, line 117
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
An unhandled exception occurred while processing the request.
JavaScriptException: Raven.Client.Exceptions.Documents.Patching.JavaScriptException: At 1:4{"name":"TypeError","message":"Object has no method 'filter'","callstack":" at filter(Esprima.Ast.FunctionExpression) @ 14:4\n at call(doc, args) @ 4:11\n"} ---> Jint.Runtime.JavaScriptException: Object has no method 'filter'
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
PatchCommandData patchCommandData = new PatchCommandData($"sites/{requestCultureFeature.RequestCulture.Culture.Name}", null, new PatchRequest {
Script = @" Object.keys(this.Trie).filter(function(key) {{ if(this.Trie[key].PageId === args.PageId) {{ delete this.Trie[key];
}} }});", Values = { { "PageId", $"{args.DocumentId}" } } }, null);
((IAsyncDocumentSession)args.Session).Advanced.Defer(patchCommandData);
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Object.keys(this.Trie).filter((key) => {
if(this.Trie[key].PageId === args.PageId) { delete this.Trie[key]; } });
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.