lundi 8 mars 2021

MongoDB updateOne not working properly due to $filterarray & $set using same field

this code working fine when i not change j.acc_no value, If we change j.acc_no value it does not update the document.

any one suggest any idea to fix this

$updateData = [      
'bank.$[i].details.$[j].acc_name' => 'raja K',
'bank.$[i].details.$[j].acc_no' => '35252555',
'bank.$[i].details.$[j].min_deposit' => '10000',
'bank.$[i].details.$[j].max_deposit' => '1000000',
'bank.$[i].details.$[j].status' => 1,
];

$filters = [
['i.bankname_slug' => ['$eq' => 'iob' ]],
['j.acc_no' => ['$eq' => '35252555' ]],  
];


User::raw()->updateOne(
['member_id' => 'RXOOOOO1'],
['$set' => $updateData],
['arrayFilters' => $filters]
);


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MWsBJ1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire