Re: PostgreSQL custom data type

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Sep 19 2007 - 10:44:50 EDT

  • Next message: Gary Jarrel: "Re: Temp ID issue - Exception"

    On Sep 19, 2007, at 5:29 PM, Chris Gamache wrote:

    > I think I have this cat skinned... After exhausting all avenues of
    > getting this to work without any modifications, I broke down and
    > created and registered a new ExtendedType to process java.util.UUID.
    > It wasn't difficult at all. (That's a hallmark of a good, extendable,
    > design and easy to read docs. Kudos to the Cayenne developers!)

    Very cool. Yeah - if there is a way to read/write a value via JDBC,
    Cayenne should be able to accommodate it.

    So are you simply using PreparedStatement.setObject(..) and pass
    UUID, or you convert UUID to something else (String?) before doing that?

    > I'd be happy to make my ExtendedType class available to anyone who
    > might like to use it.

    I was thinking of including an ExtendedType for UUID in Cayenne core.
    Although I guess we'll have to convert it to a "JDBC primitive" for
    DB's other than Postgres. So I guess you can open an improvement
    request in Jira and attach your code to it.

    Thanks
    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Sep 19 2007 - 10:45:24 EDT