RE: [news] Re: Status of MySQL AUTO_INCREMENT Support?

From: Cris Daniluk (cris.danilu..laraview.com)
Date: Thu Mar 31 2005 - 22:04:52 EST

  • Next message: Bryan Lewis: "Re: Querying for objects where the primary key does not equal a supplied value"

    8.0 was supposed to add that, but I'm not sure that it did. Really, even if
    it did I would not prefer it over getting straight to the sequences. All it
    is now, and all it ever will be, is a façade to sequences, which are already
    working fine in 1.2...

    Just wanted to mention it though :)

    > The question is whether it is being returned via
    > java.sql.Statement.getGeneratedKeys() ... IIRC my earlier
    > testing showed that it doesn't work...
    >
    > Andrus
    >
    >
    > On Mar 31, 2005, at 9:50 PM, Cris Daniluk wrote:
    >
    > > Postgres has a mapping through the SERIAL datatype. However, I've
    > > found its use to be convoluting during prototyping, etc (it
    > > automatically creates a named sequence that isn't automatically
    > > dropped when the table is
    > > dropped)
    > >
    > > However, it truly is automatic...
    > >
    > > Cris
    > >>
    > >> IMO auto-increment (aka generated keys) addition to JDBC
    > standard is
    > >> there to cause confusion :-) ... Driver support for it ranges from
    > >> poor to non-existent. So on the database end you can have
    > a number of
    > >> mechanisms to get a PK generated on row insert (triggers
    > being one of
    > >> them), but propagating it to Java layer is another story... AFAIK
    > >> only SQLServer and MySQL proprietary mechanisms have JDBC
    > mapping (if
    > >> you know of others, please post it here) ...
    > >>
    > >
    > >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Mar 31 2005 - 22:04:52 EST