Re: AUTO_INCREMENT pk generation in MySQL

From: Robert Bundy (rbund..enodata.com)
Date: Wed Oct 27 2004 - 20:09:12 EDT

  • Next message: Andrus Adamchik: "Re: modeler error message on objEntity delete"

    MessageI am starting an implement of this according to the previous posting:
    http://www.objectstyle.org/cayenne/lists/cayenne-user/2004/09/0172.html

    I assume that I can subclass MySQLPkGenerator to first do a query:
         SELECT LAST_INSERT_ID() FROM customer LIMIT 1;
    to get the next pk and then increment it after that to get each successive pk.
    This only works if no one else is updating this table. Is there a way around this problem?

    Robert Bundy
    720-339-1397



    This archive was generated by hypermail 2.0.0 : Wed Oct 27 2004 - 20:09:16 EDT