I have these relations:

'Questionnaire'
var $hasMany = array('Answer', 'Score');

'Answer'
var $belongsTo = array('Questionnaire');

'Score'
  var $belongsTo = array('Questionnaire');

  var $hasMany = array('Distribution');

'Distribution'
var $belongsTo = array('Score');

And this $this->data array:

Array
(
    [Score] => Array
        (
            [questionnaire_id] => 1
            [asked] => 6
            [saving] => 0.857142857142857
            [confusion] => 0.123350661145302
        )

    [Answer] => Array
        (
            [0] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 38
                    [gain] => 0.617120315940921
                    [answer] => 0
                )

            [1] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 27
                    [gain] => 0.579630589271582
                    [answer] => 0
                )

            [2] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 37
                    [gain] => 0.630463961500971
                    [answer] => 0
                )

            [3] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 21
                    [gain] => 0.573958382547494
                    [answer] => 0
                )

            [4] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 31
                    [gain] => 0.541071733269663
                    [answer] => 0
                )

            [5] => Array
                (
                    [questionnaire_id] => 1
                    [nr] => 16
                    [gain] => 0.518019986628517
                    [answer] => 0
                )

        )

    [Distribution] => Array
        (
            [0] => Array
                (
                    [score_id] => 0
                    [node_id] => 0
                    [outcome_id] => 0
                    [outcome] => 0.876649338854698
                )

            [1] => Array
                (
                    [score_id] => 0
                    [node_id] => 0
                    [outcome_id] => 1
                    [outcome] => 0.121184205629772
                )

            [2] => Array
                (
                    [score_id] => 0
                    [node_id] => 0
                    [outcome_id] => 2
                    [outcome] => 0.00215701160505212
                )

            [3] => Array
                (
                    [score_id] => 0
                    [node_id] => 0
                    [outcome_id] => 3
                    [outcome] => 9.44391047793026E-06
                )

            [4] => Array
                (
                    [score_id] => 0
                    [node_id] => 1
                    [outcome_id] => 0
                    [outcome] => 0.973397460859459
                )

            [5] => Array
                (
                    [score_id] => 0
                    [node_id] => 1
                    [outcome_id] => 1
                    [outcome] => 0.0266018207544375
                )

            [6] => Array
                (
                    [score_id] => 0
                    [node_id] => 1
                    [outcome_id] => 2
                    [outcome] => 7.18385702671455E-07
                )

            [7] => Array
                (
                    [score_id] => 0
                    [node_id] => 1
                    [outcome_id] => 3
                    [outcome] => 4.00454525238331E-13
                )

            [8] => Array
                (
                    [score_id] => 0
                    [node_id] => 2
                    [outcome_id] => 0
                    [outcome] => 0.53819737554949
                )

            [9] => Array
                (
                    [score_id] => 0
                    [node_id] => 2
                    [outcome_id] => 1
                    [outcome] => 0.426324044777277
                )

            [10] => Array
                (
                    [score_id] => 0
                    [node_id] => 2
                    [outcome_id] => 2
                    [outcome] => 0.0339819742833485
                )

            [11] => Array
                (
                    [score_id] => 0
                    [node_id] => 2
                    [outcome_id] => 3
                    [outcome] => 0.00149660538988473
                )

            [12] => Array
                (
                    [score_id] => 0
                    [node_id] => 3
                    [outcome_id] => 0
                    [outcome] => 0.90672775375481
                )

            [13] => Array
                (
                    [score_id] => 0
                    [node_id] => 3
                    [outcome_id] => 1
                    [outcome] => 0.0896124193040318
                )

            [14] => Array
                (
                    [score_id] => 0
                    [node_id] => 3
                    [outcome_id] => 2
                    [outcome] => 0.00365982694115872
                )

            [15] => Array
                (
                    [score_id] => 0
                    [node_id] => 3
                    [outcome_id] => 3
                    [outcome] => 0
                )

        )

)

Is there any way I can save it all? When I do now it will only save
the direct relations, but of course I would like to save "recursive"

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

Reply via email to