I know you can, on the fly, do new associations (or is this v1.2?)

You can in 1.1 too -- see bindModel/unbindModel in the 'model' chapter
of the manual (also often refered to in this group)

but
they only work for the next query.  Is this correct?

Well - yes ;)

But it shouldn't be difficult to have them created automatically ? How
about : In your AppModel class, add a constructor (__construct -- Cake
makes it work in php4 too) which checks for a "inherits" variable, and
then registers your association accordingly.

class Article extends AppModel
{
 var $inherits = 'Item';
}

Internally, Cake only keeps one copy of each Model -- so $item =&
ClassRegistry::getObject('Item') should return the the Item model that
is used everywhere ; you can easilly call bindModel on this object, and
the association will be valid everywhere.

Anselm


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