File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
graph/src/components/store Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ impl EntityCache {
288288 ) -> Result < Option < Entity > , anyhow:: Error > {
289289 match op {
290290 EntityOp :: Update ( entity) | EntityOp :: Overwrite ( entity)
291- if query. matches ( key, & entity) =>
291+ if query. matches ( key, entity) =>
292292 {
293293 Ok ( Some ( entity. clone ( ) ) )
294294 }
@@ -383,6 +383,7 @@ impl EntityCache {
383383
384384 // The next VID is based on a block number and a sequence within the block
385385 let vid = ( ( block as i64 ) << 32 ) + self . vid_seq as i64 ;
386+ self . vid_seq += 1 ;
386387 let mut entity = entity;
387388 let old_vid = entity. set_vid ( vid) . expect ( "the vid should be set" ) ;
388389 // Make sure that there was no VID previously set for this entity.
@@ -395,6 +396,8 @@ impl EntityCache {
395396 ) ;
396397 }
397398
399+ self . entity_op ( key. clone ( ) , EntityOp :: Update ( entity) ) ;
400+
398401 // The updates we were given are not valid by themselves; force a
399402 // lookup in the database and check again with an entity that merges
400403 // the existing entity with the changes
You can’t perform that action at this time.
0 commit comments