-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieve fields in the model #203
Comments
@fred9176 this is not а datamapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: