Hi Roger,

I'm sorry, this mail was lost in my inbox.

java.util.UUID types are supported since jOOQ 3.0:
https://github.com/jOOQ/jOOQ/issues/1624

If your database doesn't natively support UUIDs (e.g. MySQL), you can let
the jOOQ code generator force UUID types upon your column:


        <forcedType>
            <name>UUID</name>
            <expressions>(?i:(.*?.)?T_EXOTIC_TYPES.UU)</expressions>
        </forcedType>

A similar usage of forcedType can be seen here:
- http://stackoverflow.com/a/14126345/521799
- http://www.jooq.org/doc/3.0/manual/code-generation/custom-data-types/

Using VARCHAR(36) is certainly going to work. I have never tried using
BYTE(16) yet. Should you try the latter, feel free to provide feedback on
how this works out.

Cheers
Lukas


2013/6/12 Roger Thomas <[email protected]>

> Hi, I'm currently looking at an issue which requires UUID support in a
> MYSQL world.
>
> As standard MYSQL does not have a UUID type, instead the 2 normal
> solutions are to store the value in a varchar(36) or a BYTE(16), with the
> BYTE solution being recommended due to the reduced database storage
> requirements and better index performance.
>
> What support in jOOQ is there for such mapping, or do I have to go down
> the route of Custom data types and type conversion 
> ?<http://www.jooq.org/manual/ADVANCED/CustomTypes/>
>
>
> Thanks
>
>  --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to