I have a model Part using table parts with a self join (parent_id = id)
I've created a hasMany array association with the self join, and that
seems to be working okay. find and findAll return what I expect after
reading the documentation.
var $hasMany = array(
"Subparts" =>
array(
'className' => 'Part'
'conditions' => null,
'order' => null,
'foreignKey' => 'parent_id',
'fields' => null,
'dependent' => true,
'exclusive' => false,
'finderQuery' => null,
'counterQuery' => null
) )
The model has other hasMany associations, and they also return the data
as I expect.
However the callback afterFind only fires once for the Part model.
afterFind callbacks fire for the other associated models, but not for
the self join (Subparts). I was hoping to be able to process the
Subparts in the callback of the Parts model.
Can anyone tell me if there is there something else I have to do, or if
I am misunderstanding what's going on?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---