I swear I had this working before, but I just noticed that its not mapping datetime to java.util.Date anymore. I'm running against master in github, but I tried against 3.2 also and its not working. I really don't know what I'm doing wrong. Here's my codegen.xml and also a sample table. Is there something obviously wrong?
CREATE TABLE IF NOT EXISTS `account` (
`id` bigint(19) NOT NULL AUTO_INCREMENT,
`uuid` varchar(128) NOT NULL,
`kind` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`state` varchar(255) NOT NULL,
`hold_data` bit(1) NOT NULL DEFAULT b'0',
`created` datetime DEFAULT NULL,
`removed` datetime DEFAULT NULL,
`remove_time` datetime DEFAULT NULL,
`data` mediumtext,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_account_name` (`name`),
KEY `idx_account_removed` (`removed`),
KEY `idx_account_resource_remove_schedule` (`remove_time`),
KEY `idx_account_resource_state` (`state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="
http://www.jooq.org/xsd/jooq-codegen-3.2.0.xsd">
<!-- Configure the database connection here -->
<jdbc>
<driver>org.drizzle.jdbc.DrizzleDriver</driver>
<url>jdbc:mysql:thin://localhost:3306/dstack</url>
<user>user</user>
<password>password</password>
</jdbc>
<generator>
<!-- The default code generator. You can override this one, to generate
your own code style Defaults to org.jooq.util.DefaultGenerator -->
<name>io.github.ibuildthecloud.dstack.db.jooq.generator.JavaGenerator</name>
<strategy>
<name>io.github.ibuildthecloud.dstack.db.jooq.generator.ModelStrategy</name>
</strategy>
<database>
<!-- The database type. The format here is: org.util.[database].[database]Database -->
<name>org.jooq.util.mysql.MySQLDatabase</name>
<!-- The database schema (or in the absence of schema support,
in your RDBMS this can be the owner, user, database name) to be generated -->
<inputSchema>dstack</inputSchema>
<!-- All elements that are generated from your schema (A Java
regular expression. Use the pipe to separate several expressions) Watch out
for case-sensitivity. Depending on your database, this might be important! -->
<includes>.*</includes>
<!-- All elements that are excluded from your schema (A Java
regular expression. Use the pipe to separate several expressions). Excludes
match before includes -->
<!-- <excludes>.*proc</excludes> -->
<unsignedTypes>false</unsignedTypes>
<customTypes>
<customType>
<name>java.util.Date</name>
<converter>io.github.ibuildthecloud.dstack.db.jooq.converter.DateConverter</converter>
</customType>
</customTypes>
<customTypes>
<customType>
<name>java.util.Map<String,Object></name>
<converter>io.github.ibuildthecloud.dstack.db.jooq.converter.DataConverter</converter>
</customType>
</customTypes>
<forcedTypes>
<forcedType>
<name>java.util.Date</name>
<types>datetime</types>
</forcedType>
<forcedType>
<name>java.util.Map<String,Object></name>
<expressions>.*\.data|.*\.log</expressions>
</forcedType>
</forcedTypes>
</database>
<target>
<!-- The destination package of your generated classes (within
the destination directory) -->
<packageName>io.github.ibuildthecloud.dstack.core.model</packageName>
<!-- The destination directory of your generated classes -->
<directory>src/main/java</directory>
</target>
<generate>
<interfaces>true</interfaces>
<pojos>false</pojos>
<daos>false</daos>
<jpaAnnotations>true</jpaAnnotations>
<immutablePojos>false</immutablePojos>
</generate>
</generator>
</configuration>