jOOQ not generating DAOs with <daos> flag set to true

I was facing the same problem today (2017).

In your configuration file, the same used on line command, e.g:

java -classpath jooq-3.10.2.jar:jooq-meta-3.10.2.jar:jooq-codegen-3.10.2.jar:mysql-connector-java-5.1.45-bin.jar:. org.jooq.util.GenerationTool 

In configuration.xml, put between the tags "generator" the tag "generate" with parameters respectively.

E.g:

<generator>
    ...
    <generate> 
        <pojos>false</pojos>
        <daos>true</daos>
         ...
    </generate>   
</generator> 

See more about these the parameters here.


I've found in your console output that DAO is skipping,

INFO: Generating DAOs Jan 16, 2014 12:40:45 PM org.jooq.tools.JooqLogger info INFO: Skipping DAO generation : PurchaseDao.java Jan 16, 2014 12:40:45 PM org.jooq.tools.JooqLogger info INFO: Skipping DAO generation : UserDao.java Jan 16, 2014 12:40:45 PM org.jooq.tools.JooqLogger info INFO: Table DAOs generated : Total: 212.968ms, +1.759ms

After that cheked code and found next

// [#2573] Skip DAOs for tables that don't have 1-column-PKs (for now)
1287        if (keyColumn == null) {
1288            log.info("Skipping DAO generation", getStrategy().getFileName(table, Mode.DAO));
1289            return;
1290        }