Hibernate throws "ERROR: syntax error at or near". How to escape a column name?

You need to escape the name column:

    @Column(name="`user`")

Or you could set the hibernate.globally_quoted_identifiers configuration property to true.

1 Like