I'm getting an error that I don't understand while trying to create a custom data persister.
2012-09-18 08:37:00,526 DEBUG ( ?:?) - created dao for class class Region with reflection
2012-09-18 08:37:00,533 DEBUG ( ?:?) - built statement SELECT * FROM `region` WHERE `label` = 'Fred'
2012-09-18 08:37:00,579 DEBUG ( ?:?) - opened connection to jdbc:postgresql://
127.0.0.1/mydb got #1355906755
2012-09-18 08:37:00,587 DEBUG ( ?:?) - prepared statement 'SELECT * FROM `region` WHERE `label` = 'Fred' ' with 0 args
2012-09-18 08:37:00,594 DEBUG ( ?:?) - cache released connection #221607586
org.postgresql.util.PSQLException: ERROR: syntax error at or near "`"
Position: 15
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
at com.j256.ormlite.jdbc.JdbcCompiledStatement.runQuery(JdbcCompiledStatement.java:55)
at com.j256.ormlite.stmt.SelectIterator.<init>(SelectIterator.java:55)
at com.j256.ormlite.stmt.StatementExecutor.buildIterator(StatementExecutor.java:206)
at com.j256.ormlite.stmt.StatementExecutor.query(StatementExecutor.java:155)
at com.j256.ormlite.dao.BaseDaoImpl.query(BaseDaoImpl.java:261)
at TestORMLite.main(TestORMLite.java:48)
I found one post that mentioned something similar but the fix didn't seem relevant. Any suggestions appreciated.
Thanks