Re: Sequence in Oracle
Hi Bruno, I don't know if this helps you. Change your trigger, so you only retrieve a new sequence number if the field is empty. Something like this: CREATE OR REPLACE TRIGGER TRG_CARL_ID BEFORE INSERT ON CARLINES FOR EACH ROW BEGIN IF :new.carl_id IS NULL THEN SELECT seq_carl_id.nextval INTO :new.carl_id FROM dual; END IF; END; Best regards Tom Am Montag, 2. Juli 2012 19:53:19 UTC+2 schrieb Bruno Augusto: > > friends, > > I am using oracle database and when execute the save command the oracle > save and on the same time it run a currval sequence. The problem is I do > not need to use sequence in this table. > > Is there anyway from cake does not execute the sequence? > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Sequence in Oracle
friends, I am using oracle database and when execute the save command the oracle save and on the same time it run a currval sequence. The problem is I do not need to use sequence in this table. Is there anyway from cake does not execute the sequence? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Sequence in Oracle
Friends, I am using oracle database and when execute the save command the oracle save and on the same time it run a currval sequence. The problem is I do not need to use sequence in this table. Is there anyway from cake does not execute the sequence? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php