Hi Patrick,

pat wrote:
> How can create set/getter fields in my model that do not exist in the
> database?
You can modify the data in the model afterFind method.

> For example, I have field "downloadRatebps" in a table, I would like to
> do display and updates of this in Kbps (Kilo bits per second). As it
> stands, this does not appear to be an easy task.
with the beforeSave model method you can transparently change the value
before it is set in the DB table; With the afterFind you can
transparently change it to be Kbps before it is received by the
controller

>
> As I see it, the issue may be more-so that there is no OO
> encapusulation of our tables (that I know of), hence no ability to
> extend the properties of our records.
Models :)

Cheers,

AD7six
http://manual.cakephp.org/chapter/6


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to