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 because the ORM layer in cake
> > isn't fully object oriented yet (I understand it's planned for 2.0).
>
> > For your second question: you can check for the value of your checkbox
> > field in the controller action that receives the form submission and
> > after you're done with it just unset() it.
>
> > Hope this help!
>
> > On Mar 22, 2:32 am, "Justin Hernandez" <[EMAIL PROTECTED]> wrote:
>
> > >   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_accessor it creates a variable in the model
> > > which can be written and read to and from. Is there a equivalent in
> > > cakephp?
> > >   Or should I just be lazy and create a column in the table. That way
> > > I can benefit from all the data validation, etc. Thanks.
>
> > > On Mar 21, 1:40 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
>
> > > > 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?  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" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to