atomic update of record using mongoengine

30 views
Skip to first unread message

Raviteja Athmakuri

unread,
May 30, 2020, 2:24:31 AM5/30/20
to MongoEngine Users
I have a record which is similar to as below
{
    request_id : 1,
    steps:{
        "event.post.product":{
            status:false
        }
    }
}

i want to update it to as following
{
    request_id : 1,
    steps:{
        "event.post.product":{
            status:true
        }
    }
}
sometimes i want to update it to as following

{
    request_id : 1,
    steps:{
        "event.post.product":{
            status:false,
            write : 223
            read : 220
            error : 3 
        }
    }
}

how can i update the records like this I want some help regarding this using mongoengine in python

thanks in advance

Isha Agarwal

unread,
Aug 7, 2020, 1:42:09 AM8/7/20
to MongoEngine Users
have you solved this problem ??
Reply all
Reply to author
Forward
0 new messages