in reply to DBIx::Class and Oracle sequences

SQL Code after 5 seconds of searching the WWW:

INSERT INTO suppliers (supplier_id, supplier_name) VALUES (supplier_seq.nextval, 'BigCompany');

Now you just have to tell DBIx::Class to pass the sequence name and ".nextval" unchanged to the database whenever you insert a new row. I'm too lazy to read the docs on how to do it.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: DBIx::Class and Oracle sequences
by Anonymous Monk on May 11, 2009 at 21:11 UTC
    I am sorry - is this posting for real?

    I know how to do it in plain SQL - that was not my question.

    And had you played with DBIx::Class for even a minute you would know that "telling" DBIx::Class is sometimes not so straightforward.

    I'm too lazy to read the docs on how to do it.
    Sure, why not post something entirely useless instead...