UUID support is implemented on github master. These databases have native support for such a type:
- H2 UUID data type: http://www.h2database.com/html/datatypes.html#uuid_type - Postgres UUID data type: http://www.postgresql.org/docs/9.2/static/datatype-uuid.html - SQL Server uniqueidentifier data type: http://msdn.microsoft.com/en-us/library/ms187942 - Sybase SQL Anywhere also supports it In other databases, jOOQ allows for mapping the java.util.UUID type to a CHAR/VARCHAR columns. Implementations that map UUIDs to BINARY(16) can be achieved through custom data types using Converters Cheers Lukas 2013/1/5 Lukas Eder <lukas.e...@gmail.com> > It seems that the Postgres JDBC driver natively supports java.util.UUID > through ResultSet.getObject() and PreparedStatement.setObject(). Adding > support seems as simple as adding an org.jooq.impl.SQLDataType.UUID that > maps the "uuid" type name to the java.util.UUID class. > > This will be implemented in jOOQ 3.0 and has a high chance of being > backported to 2.7. I will see if UUID types can be supported for all > databases through jOOQ's internal type mapping > > Cheers > Lukas > > > 2012/12/29 adela <a...@oax.com> > >> Lukas, >> >> You are awesome! Keep up the good work! Thank you...That would be >> really nice to have in today's distributed environments! >> >> >> On Wednesday, December 26, 2012 10:39:53 AM UTC-6, Lukas Eder wrote: >> >>> Hello, >>> >>> Already today, you can use org.jooq.Converter types to convert some of >>> your database columns to UUID's. Please consider the relevant sections >>> of the manual for this: >>> >>> Runtime conversion >>> http://www.jooq.org/doc/2.6/**manual/sql-execution/fetching/** >>> data-type-conversion/<http://www.jooq.org/doc/2.6/manual/sql-execution/fetching/data-type-conversion/> >>> >>> Code-generation time conversion >>> http://www.jooq.org/doc/2.6/**manual/code-generation/custom-** >>> data-types/<http://www.jooq.org/doc/2.6/manual/code-generation/custom-data-types/> >>> >>> Formal UUID support for Postgres, SQL Server and some other databases >>> that natively support such a type is on the roadmap: >>> https://github.com/jOOQ/jOOQ/**issues/1624<https://github.com/jOOQ/jOOQ/issues/1624> >>> >>> Cheers >>> Lukas >>> >>> 2012/12/26 adela <ad...@oax.com>: >>> > I am also trying to use UUID (as Primary Key) in PostgreSQL DB. It >>> would be >>> > nice to have native java.util.UUID support >>> > (via JOOQ) for many reasons such as type safety, performance,...and >>> less >>> > code trying to convert/validate UUID correctness to/from DB.... >>> > >>> > >>> > On Saturday, September 1, 2012 1:42:06 AM UTC-5, Lukas Eder wrote: >>> >> >>> >> > My team have problem with fetching data from tables containing uuid >>> >> > column >>> >> > type? Does that data type is support by Jooq or how implement >>> fetching >>> >> > data >>> >> > to string type? >>> >> >>> >> More formal support for UUID types is on the roadmap: >>> >> https://github.com/jOOQ/jOOQ/**issues/1624<https://github.com/jOOQ/jOOQ/issues/1624> >>> >> >>> >> Currently, I suggest you have this type treated as VARCHAR / String. >>> >> What type of problems are you running into? >>> >> >>> >> Cheers >>> >> Lukas >>> >> >