Re: No ID returning from the model when inserting new record

2009-05-22 Thread Jared
getInsertID as well as $this->Model->id also both do not work for me. On May 15, 12:43 am, "oly.yates" wrote: > Yes I tried that and it didn't work had the same problem as if I did > $this->Document->id, > would return the id only on saving an existing document not on saving > a new Document --~

Re: No ID returning from the model when inserting new record

2009-05-15 Thread oly.yates
Yes I tried that and it didn't work had the same problem as if I did $this->Document->id, would return the id only on saving an existing document not on saving a new Document --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: No ID returning from the model when inserting new record

2009-05-14 Thread brian
$documentid = $this->Document->getInsertId(); On Thu, May 14, 2009 at 4:15 AM, oly.yates wrote: > > Ok well the problem defiantly seems to be cake to getting the document > sequence as it all works fine when i do this: > if($this->Document->saveAll($this->data)){ >            if(!$this->Document

Re: No ID returning from the model when inserting new record

2009-05-14 Thread oly.yates
Ok well the problem defiantly seems to be cake to getting the document sequence as it all works fine when i do this: if($this->Document->saveAll($this->data)){ if(!$this->Document->id){ $documentid = $this->Document->query("SELECT documentid_seq.currval FROM dual");

Re: No ID returning from the model when inserting new record

2009-05-14 Thread oly.yates
Thx for the tip with "set". Starting to suspect that the problem lies with my database and cake not being able to get the current value of the sequence (I'm using Oracle), does cake rely on any naming conventions for sequences or indexes? I get the following errors: Notice (8): Undefined index:

Re: No ID returning from the model when inserting new record

2009-05-13 Thread Faza
It's a bit weird, especially that calling the same function to edit the record returns the proper id. i use the same property with such syntax: if ($this->Design->saveAll($this->data)) { $this->notify(2,$this->Design->id); $this->redirec

No ID returning from the model when inserting new record

2009-05-13 Thread oly.ya...@googlemail.com
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 = '"S