Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Model Edit - "Property "updated_at" not found for Model_Cv_Question"
Hey Guys, I've got a few forms on the same page, generated by a ViewModel.
The original CRUD code was generated using oil, and I haven't changed any of the code for them.
When I'm trying to do an edit on a particular model, I get this error back; OutOfBoundsException [ Error ]: Property "updated_at" not found for Model_Cv_Question. Any idea's of why this would happen ?
You've probably added the Observer_UpdatedAt without having added a property for it to use.
I see in the Model file created by oil has this code in. 'Orm\Observer_CreatedAt' => array('before_insert'),
'Orm\Observer_UpdatedAt' => array('before_save'), How do I add that property when saving ? or can I take it out of the model ?
The column needs to be present in the table, no way to save it otherwise. Adding it to the model is like any other property:
Or if you don't use the $_properties setting and just mysql auto-detect, adding the column to the DB would be enough.
Makes a bit more sense! Great stuff, thanks for the help again Jelmer.
Got it working by adding a updated_ad field.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion