Thanks again! Quoting is somewhat I've completely forgotten about. On Fri, Jan 13, 2017 at 9:42 PM, Andrus Adamchik <and...@objectstyle.org> wrote: > Thanks for clarification and the fix. > > Just found another issue - when "Quote SQL Identifiers" is on, the generated > SQL is incorrect. I guess the function should not be placed in quotations. > E.g. here is a MySQL example: > > Property<Long> count = > Property.create(FunctionExpressionFactory.countExp(), Long.TYPE); > ObjectSelect.query(MyType.class).column(count).selectOne(context); > > bootique-http-38 o.a.c.l.CommonsJdbcEventLogger: SELECT `COUNT(*)` FROM > `my_table` `t0` > bootique-http-38 o.a.c.l.CommonsJdbcEventLogger: *** error. > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column > 'COUNT(*)' in 'field list' > > Andrus > >> On Jan 13, 2017, at 12:25 PM, Nikita Timofeev <ntimof...@objectstyle.com> >> wrote: >> >> Hi Andrus, >> >> It should be public. Lost it after splitting away ColumnSelect. Thank >> you for catch! >> >> On Fri, Jan 13, 2017 at 7:57 PM, Andrus Adamchik <and...@objectstyle.org> >> wrote: >>> @Nikita: >>> >>> ObjectSelect.column(..) is protected, so I can't use it for a single-column >>> query. Is this intentional? >>> >>> Thanks, >>> Andrus >> >> >> >> -- >> Best regards, >> Nikita Timofeev >
-- Best regards, Nikita Timofeev