2015-01-29 16:21 GMT+01:00 Lukas Eder <[email protected]>: > Hello, and sorry for the delay > > 2015-01-25 4:03 GMT+01:00 Oliver Wahl <[email protected]>: > >> I've searched hi and low on the net to figure out an easy way to use an >> java.util.UUID type as record id. As this is a MariaDB instance I used a >> binary(16) field as storage. >> >> Now on to the problem: I tried using a definition of a SQLDataType.UUID >> mapping as I understood that this is internally mapped to a java.util.UUID. >> The configuration used was: >> >> <forcedType> >> >> <name>UUID</name> >> >> <expression>(?i:.*\..*_uuid)$/expression> >> >> </forcedType> >> >> >> Generated code did compile but fetching data always resulted in NULL >> values instead of the correctly stored UUIDs (and yes newRecord/store did >> work). A little debugging showed that default converter was trying to parse >> a String into a UUID and obviously the regex matcher didn't work on the >> binary data. >> > > Yes, this currently only works if the database contains a VARCHAR > representation of your UUID. I wonder if we can make the "forcedType-only" > configuration work also for BINARY representations. >
I'm sorry, no we cannot make that work for BINARY representations, as we don't have any information about the actual database column type, if you're applying only "forcedType". In that case, all original type information is lost, and UUID is all we know. -- 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/d/optout.
