Schema generation Problem

From: Joe Baldwin (joebaldwin40..ox.net)
Date: Thu Jan 24 2008 - 00:53:46 EST

  • Next message: hmai..otmail.ru: "Problems running Cayenne ORM Tier and CWS Client Tier on the same JVM."

    The Cayenne Modeler Schema generator, on occasion, generates some
    errors associated with AUTO_PK_SUPPORT (see excerpt below from the
    problem report). I am a tad confused, because I can't figure out what
    I could have done to cause this. I have seen the problem arise
    before, and my solution was to noodle around with the ER Model, and
    presto, the errors go away. Unfortunately, the come back now an again
    so I guess I will have to figure out what the heck I am doing to cause
    this (and it would be nice to figure out what I was doing that
    resulted in the problem going away so I can do it again :) ).

    The datasource is MySQL. I have created an Integer PK attribute
    called "oid". The "PK Generation Strategy" is database generated.

    My guess is that I have inadvertently gotten something out of sync in
    the Modeler. The Problem report does not make sense to me, and upon
    checking the MySQL database, the AUTO_PK_SUPPORT table is in fact
    missing. Very odd. Could this be a MySQL problem?

    [SQL: CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL,
    NEXT_ID INTEGER NOT NULL, UNIQUE (TABLE_NAME))] - Table
    'auto_pk_support' already exists
    [SQL: DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('admin',
    'audio', 'customer', 'metadata', 'orderitem', 'photo', 'prodclass',
    'product', 'salesorder', 'vendor', 'video')] - Table
    'pickerswebsite.auto_pk_support' doesn't exist
    [SQL: INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES
    ('admin', 200)] - Table 'pickerswebsite.auto_pk_support' doesn't exist



    This archive was generated by hypermail 2.0.0 : Thu Jan 24 2008 - 01:30:39 EST