I need to update particular field in table using CRUD operation of Magento.

I have tried below for insert new record it is working


I have tried below for update particular row but it does not work


What is the right way to update table?

1 Answer 1

$cancelId = 5;//id for entry to update
$cancel = $this->_cancelFactory->create();

But as explained in the answers in here: Deprecated save and load methods in Abstract Model, load and save are deprecated. You should create service contracts for your module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.