Collapse Submit a Service Request Contact Information for Technical SupportMy Service Notifications Support Suggestion Box
Using save() in a custom model
Answer ID 10449 | Last Review Date 11/14/2018
Why does Connect PHP save() operation not work when called from a model?
Oracle B2C Service Customer Portal Framework 3.3 and newer
Create, Read, Update, Destroy (CRUD) operations allow for the creation, read, update and delete of primary objects contained in Oracle B2C Service.
The save() and destroy() methods are not committed to the database until the transaction method ConnectAPI::commit() is executed implicitly or explicitly. For implicitly executing the method, the script will need to exit with a zero status.
The role of a custom model is to provide custom object record data to the controller, which in turn can manipulate the data and perform actions such as updating database records. Models were not designed to handle Create/Update operations by themselves, therefore there is no implicit commit being performed automatically.
Please refer the online Connect PHP documentation for more information: