cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: PostgreSQL custom data type
Date Wed, 19 Sep 2007 14:44:50 GMT

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.


View raw message