, :
HABTM. , , , , , primaryKeys displayFields ..
, HABTM. , , a Question Qset . ,
$data = array('Question'=>array('title'=>'new_question'),
'Qset'=>array('name'=>'lets say qset'));
$this->Question->saveAll($data);
, cake HABTM , . QsetsQuestion . , , , , :
$data = array('qset_id'=> $qset_id,
'question_id'=> $question_id);
$this->Question->QsetsQuestion->save($data);
qsets_questions, , .
, , , , , , .
[EDIT]
"", .
Cakephp
HasAndBelongsToMany Cake , . , 10 . 2 . 2 , 12.
, , . - Qsets, , $data ( , ). HABTM ( "Challenge IV" ).
, , , "", , QsetsQuestion. , , Questions . QsetsQuestion :
Qset hasMany QsetsQuestion
QsetsQuestion belongsTo Qset, Question
Question hasMany Qsets.
... , .
, :
, Qset-Question, , , ,
$data = array('Question'=>array('id'=>1),
'Qsets'=>array('Qsets'=>array(1,2,3,4, $new_qset));
$this->Question-save($data);
, QsetsQuestion, . , HABTM .
(), , (, 2-2 ). .