Il giorno venerdì 14 febbraio 2014 01:57:53 UTC+1, mark_story ha scritto:
-- One more thing. The orm will use the getter functions when preparing the data to be saved. Since your getter reverses te setter. This might be the source of your problem.
Yes, commenting the getter the save works as expected.
But how can I do what I was trying to do? I would expect that saving use setter but not getter so as I can save some modified data and retireve later in the original format.
I.e.
saving data
original data = 'name surname' => save (use setter) => save on db 'name,surname'
retrieving data
saved data on db 'name,surname' => find (use getter) => original data 'name surname'
I know I could obtain the same results modifing original data before saving it but I would know if there is a method using ORM properties.
thanks for your great work
alberto
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment