Re: Creating and persisting objects independent of the controller

2007-12-04 Thread francky06l
If you object as got a save method, this should work .. Now if you expect Cake to save it . directly no.. \ Maybe just what is this object, what you want to save, how (file, memory ...) where ? ... On Dec 4, 9:53 pm, Deane <[EMAIL PROTECTED]> wrote: > If I want to create an object, set some p

Re: Creating and persisting objects independent of the controller

2007-12-04 Thread Chris Hartjes
On Dec 4, 2007 3:53 PM, Deane <[EMAIL PROTECTED]> wrote: > We've tried this, and Cake seems to ignore it. It runs through the > code (code on either side of it runs), but this code does not result > in any SQL or any database record. Forgive my ignorance, but what do you mean by 'Cake seems to i

Creating and persisting objects independent of the controller

2007-12-04 Thread Deane
If I want to create an object, set some properties, and save it, can I do this in my controller: $MyObject = new ThingaMajig(); $MyObject->some_property = "some value"; $MyObject->save() This object has nothing to do with my controller. This just needs to happen in one of the methods. We've tr