Re: Are Model classes supposed to be singletons?

2007-07-27 Thread bingomanatee
That is useful to know -- it is not a complete answer to the larger question: if you create a new model() and save it in the ClassRepository, use it in one context, then use it in another (or with nested methods use it back and forth between two different contexts) are there any predictable/unwant

Re: Are Model classes supposed to be singletons?

2007-07-27 Thread grigri
I'm not sure if it was me doing something wrong, but I found an annoying side-effect of this. If you want to dynamically bind associations, binding occurs on the entire model - which is shared. So if you have: class Company extends AppModel { var $hasOne = array( 'Logo' => array('className'

Are Model classes supposed to be singletons?

2007-07-26 Thread bingomanatee
The opportunity for caching model objects as singletons in the ClasssRepository exists; is there any reason why this should NOT be done? Can this create any conflicts that might sabotage your code? --~--~-~--~~~---~--~~ You received this message because you are su