Hi Lukas,
I found the sample of selectCount() is wrong, Doc:
http://www.jooq.org/javadoc/latest/org/jooq/impl/Factory.html#selectCount()
create.selectCount()
.from(table1)
.join(table2).on(field1.equal(field2))
.where(field1.greaterThan(100))
.orderBy(field2)
.execute(); <----- here, this method will return the number of
resulting records, not the number of count(*). and always be 1.
I change it as below.
...
.orderBy(field2)
.fetchOne(0, Integer.class)
.intValue();
For your information, thanks.
- Pay