Re: Unique fields

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Oct 05 2004 - 19:22:53 EDT

  • Next message: Andrus Adamchik: "Re: Is it OK to model multiple relationships to the same table?"

    Trying to answer a few emails in this thread at once ;-)

    On Oct 5, 2004, at 10:22 AM, Gentry, Michael wrote:
    > I could see an option for putting it in the model for the purpose of
    > schema creation

    That's the only thing I had in mind when proposing to open a ticket in
    JIRA. I definitely have no intentions to force Cayenne doing the DB
    work.

    On Oct 5, 2004, at 10:52 AM, Cris Daniluk wrote (also mentioned by
    Stefaan Huysentruyt)
    > Why not let the database do it and simply have the db adapters better
    > equipped to handle the unique constraint exception? Oracle, PG, MySQL
    > all have a unique constraint and all throw a consistent (though
    > different)
    > exception.

    That's an interesting idea, however this is also lots of maintenance
    burden to keep an internal mapping of all possible DB error codes and
    track possible changes between releases of both DB and JDBC driver. So
    it will be hard to achieve consistency here...

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Oct 05 2004 - 19:22:59 EDT