Monday, June 7, 2010

grails, sql, datasource

If you are trying to use groovy.sql.Sql to formulate your own queries: don't use the Sql.executeInsert() method as it won't work on HSQLDB. executeInsert() produces an exception claiming "unknown function". But if you use Sql.execute() you won't encounter such a problem.

Before you ask: the advantage of executeInsert would have been that you get the ids of auto-generated columns as return value(s).

No comments:

Post a Comment