Re: To dep PK

From: Aristedes Maniatis (ar..aniatis.org)
Date: Tue Oct 02 2007 - 20:34:35 EDT

  • Next message: Robert A. Decker: "Load DataSource (opt.)"

    On 03/10/2007, at 9:25 AM, pinkybum_nabble wrote:

    > I have unchecked all the "To dep PK" boxes. The PK generation
    > setting is
    > default. The log output is as follows:
    >
    > INFO QueryLogger: INSERT INTO ScanFiles (SCANFILE_ID, name) VALUES
    > (?, ?)
    > INFO QueryLogger: [bind: 200, 'ScanNumber B1']
    > INFO QueryLogger: === updated 1 row.
    > INFO QueryLogger: [bind: 200, 'ScanNumber A1']
    > INFO QueryLogger: *** error.
    >
    > It seems the PK generator is creating a duplicate SCANFILE_ID of
    > 200 (which
    > is the default starting value in AUTO_PK_SUPPORT.

    OK. This looks like you've identified the underlying problem. But I
    can't imagine the cause of this problem, maybe someone else has
    ideas. Do you have:

    * PK ticked in the model for the correct fields?
    * a table which looks like CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME
    CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TABLE_NAME))
    * is AUTO_PK_SUPPORT writable by the application?

    Maybe you could work through the tutorial and see how your model
    differs:

    http://cayenne.apache.org/doc/quick-start.html

    Ari Maniatis

    -------------------------->
    Aristedes Maniatis
    phone +61 2 9660 9700
    PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8





    This archive was generated by hypermail 2.0.0 : Tue Oct 02 2007 - 20:35:11 EDT