我正在尝试使用JOOQ连接到HSQLDB但是我失败了,这是错误消息:
INFO: Initialising properties : /codegen.xml
2014-02-09T09:55:19.542+0100 SEVERE Error while fetching check constraints
org.jooq.exception.DataAccessException: SQL [select "tc"."TABLE_SCHEMA", "tc"."TABLE_NAME", "cc"."CONSTRAINT_NAME", "cc"."CHECK_CLAUSE" from "INFORMATION_SCHEMA"."TABLE_CONSTRAINTS" as "tc" join "INFORMATION_SCHEMA"."CHECK_CONSTRAINTS" as "cc" using( "CONSTRAINT_CATALOG", "CONSTRAINT_SCHEMA", "CONSTRAINT_NAME") where "tc"."TABLE_SCHEMA" in (cast(? as varchar(128)))]; user lacks privilege or object not found: cc.CONSTRAINT_NAME
此查询也在HSQLDB管理器上失败(与JOOQ代码生成器的错误相同):
select "tc"."TABLE_SCHEMA", "tc"."TABLE_NAME", "cc"."CHECK_CLAUSE" , "cc"."CONSTRAINT_NAME"
from "INFORMATION_SCHEMA"."TABLE_CONSTRAINTS" as "tc"
join "INFORMATION_SCHEMA"."CHECK_CONSTRAINTS" as "cc"
using( "CONSTRAINT_CATALOG", "CONSTRAINT_SCHEMA", "CONSTRAINT_NAME")
此查询正常工作:
select "tc"."TABLE_SCHEMA", "tc"."TABLE_NAME", "cc"."CHECK_CLAUSE" , "CONSTRAINT_NAME"
from "INFORMATION_SCHEMA"."TABLE_CONSTRAINTS" as "tc"
join "INFORMATION_SCHEMA"."CHECK_CONSTRAINTS" as "cc"
using( "CONSTRAINT_CATALOG", "CONSTRAINT_SCHEMA", "CONSTRAINT_NAME")
我认为问题出在“cc”限定符上(在查询返回的“CONSTRAINT_NAME”字段上),这是一个HSQLDB错误吗?
我正在使用:
由于 Ciccio