On 9/19/07, Andrus Adamchik <andru..bjectstyle.org> wrote:
> Hi Chris,
> I couldn't find definitive docs on the nature of uniqueidentifier
> type (Is there any?) From what little I've found, "uniqueidentifier"
> is a binary value. So could you try to map it a Types.VARBINARY on DB
> end and "byte" on the Java end?
No really good docs. I'm currently using the contrib version of
uniqueidentifier (heavily patched), but there will be a native
uniqueidentifier type in the next release probably not based on the
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!)
First, I'm using the JDBC connection string parameter
"stringtype=unspecified" to leave off the direct casting for quoted
strings. I'm using Types.OTHER when communicating with JDBC.
It has passed my unit tests heretofore.
I'd be happy to make my ExtendedType class available to anyone who
might like to use it.
The only thing missing is the ability to register the ExtendedType in
the XML config, which the docs report is a feature which is planned
for the future.
This archive was generated by hypermail 2.0.0 : Wed Sep 19 2007 - 10:29:45 EDT