I'm using JPA with Hibernate EntityManager. I have an entity called
user and I have hbm2ddl enabled. The thing is that
user is a Postgres' reversed word so if I'm to use it, say, as my table name, I have to quote it.
I didn't find anyway to do this. Will I have to extend Postgre dialect? Shouldn't the built-in dialectic quote reserved words by default?
Hibernate's SQL:
Code:
create table user (id int8 not null, name varchar(40), password varchar(12), username varchar(20), version int4, primary key (id))
To be SQL:
Code:
create table "user" (id int8 not null, name varchar(40), password varchar(12), username varchar(20), version int4, primary key (id))
Hibernate version: 3.2.4.sp1
Dialect: org.hibernate.dialect.PostgreSQLDialect