I'm trying to do a simple SELECT query in a table named ECM (in uppercase) on a Sybase db with Hibernate. I've annotated my DBO this way :
@Entity
@Table(name="ECM")
public class RelationshipDbo {
...
}
However, I'm facing a "table not found" error : the generated SQL has the table name in lowercase. I cannot change the database configuration to tell it to be case-insensitive.
I've also tried putting quotes like this :
@Table(name="`ECM`")
and this :
@Table(name="'ECM'")
Result : the quotes are added in the query, but the table name is still converted from uppercase to lowercase.
Technical information :
Hibernate 4.3
JPA 1.2
org.hibernate.dialect.SybaseDialect
Have you guys any idea?
EDIT: Also tried this Hibernate changes @Table(name) to lowercase
Then my columns names and table name are automatically quoted, but the names still get lowercased.
Try this:
Use backticks as in @Table(name="`ECM`")?
This must work from Hibernate point. If not then problem should be in DB (if i'm not wrong)