문제

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)
도움이 되었습니까?

해결책 2

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

hibernate.default_catalog={
hibernate.default_schema=}schemaname

the resulting code looks like

select * from {.}schemaname.tablename

which is accepted by informix query parser.

다른 팁

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.

Delete the schema and catalog attributes from *.hbm.xml.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top