is there a better way of dealing with this cakephp model

Sky

New Member
\[code\]class registration extends AppModel {public $name ='registration';public $belongsTo =array('student','term','school');public $validate =array( 'student'=>array( 'rule' => 'isUnique', 'message' => 'This username has already been taken.' ));public function register($appl,$regno,$sg){ $this->student->save( array( 'application_id'=>$appl ) ); $this->save( array( 'student_id' => $SID, 'regno' => $regno, 'term_id' => $term, 'school_grade_id' => $grade, 'school_id' => $sch ) );}\[/code\]am try to save in two table but have the following challenges 1.i need the same IDs to inserted into both do have have to create my own or can i still use cake's 36 char ID thats coining the both queries into one. then my validation rule seem not to work.
 
Back
Top