Re: Fetching a NextVal to be used in an insert

From: Bryan Lewis (brya..aine.rr.com)
Date: Mon Nov 01 2004 - 14:29:28 EST

  • Next message: Williams, Beth: "RE: Fetching a NextVal to be used in an insert"

    Williams, Beth wrote:

    > No custom validations on the personId field. Yes, we are using Oracle and yes, we do have a sequence (PERSON_ID) set up for the Persons table.

    Is the name of the Oracle sequence the same as the name you set on the
    entity in the modeler? If it wasn't specified, the sequence name
    defaults to PK_TABLENAME, e.g., PK_PERSONS.

    When you're able to do experimentation again, look at the log to see if
    Cayenne is getting as far as the "SELECT pk_persons.nextval FROM DUAL"
    statement. It sounds like the sequence doesn't exist by that name.

    If it does get that far, the next SQL statement will probably be the
    INSERT and you'll be able to see from the bindings what it's using for
    the PERSON_ID.



    This archive was generated by hypermail 2.0.0 : Mon Nov 01 2004 - 14:29:44 EST