From 342099fce8fbc01d1d9f4ae6520a3b7c1f81d27e Mon Sep 17 00:00:00 2001 From: gladcow Date: Sat, 12 Oct 2019 16:32:17 +0300 Subject: [PATCH] fix insert object processing in indexes, son_delete is working --- libraries/db/include/graphene/db/index.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/db/include/graphene/db/index.hpp b/libraries/db/include/graphene/db/index.hpp index 1bc593f4..e8d4fa11 100644 --- a/libraries/db/include/graphene/db/index.hpp +++ b/libraries/db/include/graphene/db/index.hpp @@ -402,6 +402,15 @@ namespace graphene { namespace db { DerivedIndex::remove(obj); } + virtual const object& insert( object&& obj )override + { + const auto& res = DerivedIndex::insert(std::move(obj)); + for( const auto& item : _sindex ) + item->object_inserted( res ); + on_add(res); + return res; + } + virtual void modify( const object& obj, const std::function& m )override { save_undo( obj );