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'm currently testing your model and it does a great job. :-)
However, there is something I don't understand : it seems that we cannot retrieve fields value after a get() directly in the model, as it's the case with most framework's models I tried.
For example, if I define a model like this :
Class Blog_model extends My_Model {
public $title = '';
public $content = '';
}
In my controller, if I call $this->blog->get(3), I can't retrieve $this->blog->title
I have to do $blog = $this->blog->get(4) to be able to get $blog->title
And this should be the same for updates or insert which should use the properties of the object.
Is this a normal behaviour or did I miss something ?
Maybe I could try triggers to set the properties with after_get and before_update.
Regards,
Fred
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently testing your model and it does a great job. :-)
However, there is something I don't understand : it seems that we cannot retrieve fields value after a get() directly in the model, as it's the case with most framework's models I tried.
For example, if I define a model like this :
Class Blog_model extends My_Model {
}
In my controller, if I call $this->blog->get(3), I can't retrieve $this->blog->title
I have to do $blog = $this->blog->get(4) to be able to get $blog->title
And this should be the same for updates or insert which should use the properties of the object.
Is this a normal behaviour or did I miss something ?
Maybe I could try triggers to set the properties with after_get and before_update.
Regards,
Fred
The text was updated successfully, but these errors were encountered: