Escape entity fields name when required

Description

I have a class defined like this :

@Entity
@Audited
public class foo {
@Column(name="`SERIAL#`")
private String serial_;
...
}

Hibernate generates sucessfully an insert statement :

insert into foo("SERIAL#") values;

whereas Hibernate Envers failed by generating :

insert into foo_aud(REVTYPE, SERIAL#, REV) values(?, ?, ?); – Note the absence of double quotes

Environment

Hibernate Core 3.6.2.Final
Hibernate Envers 3.6.2.Final
Postgesql v8.3.14

Status

Assignee

AdamA

Reporter

stephan

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

3.6.2

Priority

Blocker
Configure