Why must generate AUTO_PK_SUPPORT table ?

From: yadan (yx..ss.com.cn)
Date: Thu Nov 14 2002 - 01:27:12 EST

  • Next message: David Solis: "RE: Integration with Session Beans"

    As a normal database ,there is no a schema like "AUTO_PK_SUPPORT". But when I use cayenne writing code, it's likely that I must create the schema using the CayenneModelor menu.
    The sql generated are below:
    "
    CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL)

    DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('artist', 'gallery', 'painting')

    INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('artist', 200)

    INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('gallery', 200)

    INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('painting', 200)
     "
    I don't know why . If I haven't generate the "AUTO_PK_SUPPORT" schema,exceptions are thrown:
    "java.sql.SQLException: General error: Table 'cayenne.auto_pk_support' doesn't exist"
    (My code is only insert a record to Artist)

    If I want work with cayenne and my database schema should not changed(no extra schemas add), how should I do it ?

                                     
                  yadan
                  yx..ss.com.cn
                     2002-11-14



    This archive was generated by hypermail 2.0.0 : Thu Nov 14 2002 - 01:23:59 EST