You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have query and select the one row use merge for change some of the fields
after that in some condition need to delete the first one and after that clear a clone from the first one but determined when call the delete method it just update prev model data and change my data
for more info you can check the sample code below
letorder=Order.find(10)order.merge({amount: 100000})if(order.amount>100){awaitorder.delete()//this line update all of the prev orderorder=newOrder()order.fill({amount: 100})}
when I'm deleting the order just need the deleted_at field change and forget all the other changes
The text was updated successfully, but these errors were encountered:
I have query and select the one row use
merge
for change some of the fieldsafter that in some condition need to delete the first one and after that clear a clone from the first one but determined when call the
delete
method it just update prev model data and change my datafor more info you can check the sample code below
when I'm deleting the order just need the
deleted_at
field change and forget all the other changesThe text was updated successfully, but these errors were encountered: