public void Handle(DeleteBatchOfWorkflowsCommand message) { _logger.Info("Deleting batch of {0} workflows for {1} {2}", message.Workflows.Count, message.AssociationId, message.InitiativeId); EndpointRegistry.MakeContainerClientSpecific(_container, message.AssociationId); using (var session = _container.GetInstance<ITenantDocumentSession>()) { var workflows = session.Load<Workflow.Workflow>(message.Workflows); foreach (var workflow in workflows) { if (workflow == null) { _logger.Info("Skipping, workflow has not been created yet"); } else { _logger.Info("Deleting workflow and tasks for {0}", workflow.Id); session.DeleteById(workflow.Id); } } session.SaveChanges(); } }
public void DeleteById(string key, Guid? eTag = null)
{
_inner.Advanced.DocumentStore.DatabaseCommands.ForDatabase(_databaseName).Delete(key, eTag); }Is there a why we can figure out what is going on ?? Server Build #35215 Client Build #35215
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.
2018-07-31 16:35:54,221 [14] INFO NServiceBus.Unicast.Transport.TransportReceiver [(null)] - Failed to process messageSystem.InvalidOperationException: Can't delete changed entity using identifier. Use Delete<T>(T entity) instead. at Raven.Client.Document.InMemoryDocumentSessionOperations.Delete(String id) at Daxko.Relate.WorkflowEndpoint.DeleteBatchOfWorkflowsHandler.Handle(DeleteBatchOfWorkflowsCommand message) in e:\Jenkins\jobs\relate-build-integration\workspace\src\WorkflowEndpoint\DeleteBatchOfWorkflowsHandler.cs:line 43 at NServiceBus.Unicast.MessageHandlerRegistry.Invoke(Object handler, Object message, Dictionary`2 dictionary)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.