Reputation: 291
How will I determine if a new model was successfully save in symfony? I checked the return value of a model. For example $ret = $model->save(); but $ret returns null.
Upvotes: 0
Views: 206
Reputation: 1888
Usually, an exception (e.g. PropelException) will be thrown if something goes wrong. Text message will look like this: PropelException: Unable to execute UPDATE (ADD) statement...
Upvotes: 1
Reputation: 2908
you can query it after the save() method, and if the result is not empty save() has gone fine
Upvotes: 0