One more item on this setup.
You can create relationships in your model to bind the temp records as
children to the original record.
To do this you create two relationships in the model.
var $belongsTo = array(
'ParentBook' => array(
'className' => 'Book',
'foreignKey' => 'temp_id',
'conditions' => 'Book.temp_id is not null'));
and
var $hasMany = array(
'TempBook' => array(
'className' => 'Book',
'foreignKey' => 'temp_id'));
once this is in place you can use the containable behavior to include
or exclude the children or temp records.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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