it looks like bug... i have solve the task by this code :
function add() {
if (!empty($this->data)) {
$this->Tourist->create();
if ($this->Tourist->saveall($this->data)) {
$this->data['Tourist']['Tourist'][0]=$this->Tourist->id;
$this->Order->save($this->data);
$this->Session->setFlash(__('The Order has been
saved', true));
// $this->redirect(array('action'=>'index'));
} else {
$this->Session->setFlash(__('The Order could
not be saved. Please,
try again.', true));
}
}
//$tourists = $this->Order->Tourist->find('list');
// $this->set(compact('tourists'));
}
im use saveall() for save at tourist and after it save() for saving
orders and link it to tourist...
but is it right or its a bug?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---