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
--~
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
$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
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");
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:
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
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