Hi I'm having an issue where when I insert a new document into the
database I'm not getting the id of the new record back. The save
function looks like this:

function save() {
        if($this->Document->save($this->data)){
            $documentid = $this->Document->id;
            $message = '"Save Sucessful"';
            $this->set(compact('message'));
            $this->set(compact('documentid'));
            $this->render('save', 'ajax');
        }
    }
I know the new record is saving to the database with an id as I can
see the new record in the database. I am also getting an id back when
I edit a document and save it using this function. I'm using the
latest version of cake (1.2.3.8166).

Any ideas where/what the problem is likely to be?

--~--~---------~--~----~------------~-------~--~----~
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