Re: Are Model objects supposed to be used like singletons?

2007-07-25 Thread Grant Cox
It doesn't matter if you do instance the models yourself, but they don't need to be. The only hazards in this is if a $Model->id is already set, then a future save (without id field) will perform an UPDATE, not an INSERT. But if you follow the recommended practice of calling $Model->create() bef

Re: Are Model objects supposed to be used like singletons?

2007-07-25 Thread Joshua Benner
d question. ;) bingomanatee wrote: In Cake, are model objects supposed to be used like singletons -- stored in the classRegistry and reused between contexts? Is there any hazards implicit in recycling a single model object between contexts? --~--~-~--~~~---~--~~ You rec

Are Model objects supposed to be used like singletons?

2007-07-25 Thread bingomanatee
In Cake, are model objects supposed to be used like singletons -- stored in the classRegistry and reused between contexts? Is there any hazards implicit in recycling a single model object between contexts? --~--~-~--~~~---~--~~ You received this message because