生成的查询包含架构和目录名称
我遇到了与此处
在生成的 SQL 中,Informix 期望 catalog:schema.table
但实际生成的结果
catalog.schema.table
会导致语法错误。 设置:
hibernate.default_catalog=
hibernate.default_schema=
没有影响。 我什至从表注释中删除了架构和目录,这导致了不同的问题:查询看起来与 ..table
相同,用于将目录和架构设置为空字符串。
版本
- seam 2.1.2
- Hibernate Annotations 3.3.1.GA.CP01
- Hibernate 3.2.4.sp1.cp08
- Hibernate EntityManager 3.3.2.GAhibernate
- Jboss 4.3(类似于4.2.3)
I've the same problem as described here
In the generated SQL Informix expects catalog:schema.table
but what's actually generated is
catalog.schema.table
which leads to a syntax error.
Setting:
hibernate.default_catalog=
hibernate.default_schema=
had no effect.
I even removed schema and catalog from the table annotation, this caused a different issues : the query looked like that ..table
same for setting catalog and schema to an empty string.
Versions
- seam 2.1.2
- Hibernate Annotations 3.3.1.GA.CP01
- Hibernate 3.2.4.sp1.cp08
- Hibernate EntityManager 3.3.2.GAhibernate
- Jboss 4.3 (similar to 4.2.3)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请注意,有一个新的(截至 2010 年 4 月 26 日)网页 http://www.iiug。 org/opensource,其中包含有关将 Informix 软件与各种开源软件包(包括 Hibernate)一起使用的信息。特别是,有可下载的代码可以改进 Hibernate 和 Informix 的交互。
Note that there is a new (as of 2010-04-26) web page, http://www.iiug.org/opensource, that has information about using Informix software with various open source packages, including Hibernate. In particular, there is downloadable code that improves the interaction of Hibernate and Informix.
我最终遇到了我做过的最糟糕的黑客之一:
冒号是令人讨厌的字符,应该是“。”
目录:schema.table
。Informix 允许在 SQL 语句中添加注释
select {comment} * from sometable
所以我将
结果代码
设置为被 informix 查询解析器接受的样子。
I ended up with the one of the worst hacks I evever did:
The colon is the offending char wich should be '.'
catalog:schema.table
.Informix allows comments in SQL statements
select {comment} * from sometable
So I set
the resulting code looks like
which is accepted by informix query parser.
从
*.hbm.xml
中删除schema
和catalog
属性。Delete the
schema
andcatalog
attributes from*.hbm.xml
.