DbUnit HSQLDB - 无效架构名称:C
当使用以下查询运行测试时,HSQLDB 将表别名误认为是架构。
SELECT c.country_ml2country as CTRY_PK, c.name as CTRY_NAME,
l.name as LANGUAGE_NAME, l.code as LANGUAGE_CODE
FROM country_ml as c, language as l
WHERE c.language(+) = l.id and c.country_ml2country(+) = ?
ORDER BY l.name ASC;
以前有人经历过吗?如果“是”,那么解决方法是什么?
请注意,如果我将 FROMcountry_ml as c
更改为 FROMcountry_ml as bob
,则错误消息会相应更改为invalid schema name: BOB
。
When running a test with the following query, HSQLDB mistakes the table alias as a schema.
SELECT c.country_ml2country as CTRY_PK, c.name as CTRY_NAME,
l.name as LANGUAGE_NAME, l.code as LANGUAGE_CODE
FROM country_ml as c, language as l
WHERE c.language(+) = l.id and c.country_ml2country(+) = ?
ORDER BY l.name ASC;
Has anyone experienced this before? If "yes", then what is the fix?
Note that if I change FROM country_ml as c
to FROM country_ml as bob
, then the error message changes accordingly to invalid schema name: BOB
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于非标准 Oracle 风格的 OUTER JOIN 语法,该语法是 Oracle 特有的,其他 SQL 方言不支持。
您应该使用以下标准语法,Oracle 也支持该语法:
The problem is the non-standard Oracle-style OUTER JOIN syntax, which is specific to Oracle and not supported by other SQL dialects.
You should use instead the following standard syntax, which Oracle also supports: