It should be related to the cakephp cache queries. Try setting

$this->Planification->cacheQueries = false;

before calling ->query(...)


Regards,

Pablo Viojo
[email protected]
http://pviojo.net

¿Que necesitas?
http://needish.com


On Mon, Oct 12, 2009 at 9:44 AM, Xanax <[email protected]> wrote:

>
> Hello,
>
> I have a problem with a sequence in my cakePHP app.
>
> The problem is simple : when i call the nextval from a sequence, in a
> script, it increment by one only ONE time.
>
> IE when i do this : $sequence_planifications = $this->Planification-
> >query('SELECT PLANIFICATIONS_ID_SEQ.nextval from dual');
>
> //here I use it to create a record in my DB
>
> $sequence_planifications = $this->Planification->query('SELECT
> PLANIFICATIONS_ID_SEQ.nextval from dual');
>
> => there i have the id that is returned !
>
> I tried, of course to set the nextval in another var but the problem
> remains... And when i lauch several time this query in a SQL+, it
> increment well.
>
> Do you know what i'm missing ? Thanks in advance for any help or clue.
>
> PS : here is the creation of my sequence, if it helps :
>
> CREATE SEQUENCE PLANIFICATIONS_ID_SEQ
>  MINVALUE 1
>  MAXVALUE 999999999999999999999999999
>  INCREMENT BY 1
>  START WITH 1
>  NOCACHE
>  NOORDER
>  NOCYCLE ;
>
> >
>

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