Thanks for the further info.
On Mar 22, 10:29 am, "GreyCells" <[EMAIL PROTECTED]> wrote:
> If I understand you correctly, you'd like to add model attributes that
> can be used by the model internally (for validation etc), but not
> persisted to the database?
>
> All model data is stored as an ass
If I understand you correctly, you'd like to add model attributes that
can be used by the model internally (for validation etc), but not
persisted to the database?
All model data is stored as an associative array (a public attribute)
in the model as $this->data['ModelName']['field_name'], so you
Again thanks for the replies. CakePHP is making fine progress. I look
forward to 2.0. Anyway I think I'm just gonna take the fast way out
and create an extra column. It's not so bad because the table will be
trashed every 24 hours.
On Mar 21, 9:52 pm, "Justin Hernandez" <[EMAIL PROTECTED]> wrote:
Thanks man.
On Mar 21, 9:45 pm, "themanfrombucharest" <[EMAIL PROTECTED]>
wrote:
> Hey Justin,
>
> In reply to your first question, no, there isn't anything like that in
> cake yet.
>
> So if you want accessors/mutators you have to write the functions
> yourself. The main reason for this is becau
Hey Justin,
In reply to your first question, no, there isn't anything like that in
cake yet.
So if you want accessors/mutators you have to write the functions
yourself. The main reason for this is because the ORM layer in cake
isn't fully object oriented yet (I understand it's planned for 2.0).
Thanks for the reply Grant. My problem is that I have a 'check here
to accept' checkbox on my form. I want to associate it with my current
model even though there is no corresponding column in the table.
Because there is no column I get an incorrect index error in php. In
rails if you use attr_a
I don't know what the att_accessor is in RoR. Perhaps what you want
is the afterFind callback, where you can modify the data loaded from
the db (including adding extra attributes).
Justin Hernandez wrote:
> How can I add variables to a model without having a corresponding
> field in the table?
How can I add variables to a model without having a corresponding
field in the table? I'm looking for something like the attr_accessor
in RoR. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" grou