You need to escape the table name when using reserved keywords. In JPA 1.0, there is no standardized way and the Hibernate specific solution is to use backticks:
@Entity
@Table(name="`User`")
public class User {
...
}
In JPA 2.0, the standardized syntax looks like this:
@Entity
@Table(name="\"User\"")
public class User {
...
}
References
- Hibernate Core documentation
- JPA 2.0 specification
- 2.13 Naming of Database Objects