Hi Fred,
Thanks for your input. No, I was not overriding save anywhere and I
dont have any beforeSave callbacks in my app_model yet. However you
sparked an idea to override ProjectTask::save() to see if that's even
being called and its not!
class ProjectTask extends AppModel {
var $name = 'ProjectTask';
function save() {
echo "ProjectTask::save()<br>";
exit;
}
}
Yet the data is being stored in the DB. So it must be saving through
Schedule::save(). ProjectTask and Schedule are associated models so I
guess that's possible right? How can I force ProjectTask::save() to
handle this?
Also ProjectTask is associated to its self, could that be causing any
problems? Here are the relevant associations:
class ProjectTask extends AppModel {
var $name = 'ProjectTask';
var $belongsTo = array(
'Schedule' => array(
'className' => 'Schedule',
'foreignKey' => 'schedule_id'
),
'PreviousStep' => array(
'className' => 'ProjectTask',
'foreignKey' => 'depends_on'
)
);
var $hasMany = array(
'NextSteps' => array(
'className' => 'ProjectTasks',
'foreignKey' => 'depends_on'
)
);
}
class Schedule extends AppModel {
var $name = 'Schedule';
var $hasMany = array(
'ProjectTasks' => array(
'className' => 'ProjectTasks',
'foreignKey' => 'schedule_id',
'dependent' => true
)
);
}
Any more ideas would be greatly appreciated. Thanks in advance.
Best,
Joshua
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---