In my latest project, I am trying to make particular Models/Controllers
inherit from other Models/Controllers that I create. For example:
Items
--> Article
--> News
--> Event
In particular, I am trying to figure out the model association, so that
I can plug in a new Model and Controller and it all works magically.
My current Items Model is:
<?php
class Item extends AppModel {
var $name = 'Item';
var $hasMany = array(
'Event' =>
array('className' => 'Event',
'conditions' => '',
'order' => '',
'limit' => '',
'foreignKey' => 'item_id',
'dependent' => true,
'exclusive' => false,
'finderQuery' => ''
)
);
}
?>
I don't want to have to go in and edit the Items model every time I get
a new model that inherits from Item.
I know you can, on the fly, do new associations (or is this v1.2?) but
they only work for the next query. Is this correct?
Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---