Problem with Database Generated IDs and Firebird

From: John Armstrong (siberia..iberian.org)
Date: Mon Aug 17 2009 - 01:50:05 EDT

  • Next message: Jeremias Maerki: "Re: Problem with reverse relationships and inheritance"

    I am attempting to use database generated IDs with Cayenne 3.0M5 and
    Firebird. Even though isGenerated="true" on the proper column it still
    queries the AUTO_PK_SUPPORT table.

    Even more problematic is that the SQL generated seems invalid:

    === updated 1 row.
    INSERT INTO CLIENT (ACTIVECLIENT, CLIENTID, CLIENTSETTINGS,
    CLIENTVERSION, COMPANY, ID, LASTUPDATE) VALUES (?, ?, ?, ?, ?, ?, ?)
    [bind: 1->ACTIVECLIENT:NULL, 2->CLIENTID:'CLTSun Aug 16 22:39:58 PDT
    200...', 3->CLIENTSETTINGS:200, 4->CLIENTVERSION:200, 5->COMPANY:260,
    6->LASTUPDATE:200, 7->LASTUPDATE:NULL]
    === updated 1 row.

    Pay particular attention to argument 6 and 7. In the insert field list
    it names 6 as 'ID' (which should not be there) but in the actual
    insert it pushes 7 (LASTUPDATE) into 6 as the integer it got from
    AUTO_PK_SUPPORT (200 in this case) and then sets LASTUPDATE to null.

    I have not tried M6, I've had bad luck with the M6 modeler, so before
    I wrestle with M6 and see if this is problem still exists has anyone
    else seen it?

    Note that this works fine with mysql.. It seems FBDriver specific.

    John-



    This archive was generated by hypermail 2.0.0 : Mon Aug 17 2009 - 01:50:43 EDT