Great Pay! I noticed too the problem, and I fixed it once I read your post.
Il giorno martedì 15 gennaio 2013 08:03:31 UTC+1, Pay Liu ha scritto: > > 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 > > > -- 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.
