A SQLServer table with spaces doesn't work with the @JoinTable Annotation

Description

I have a @ManyToOne Association that uses an @JoinTable with a name that has spaces. Normal @Table(name=...) and @Column(name=...) syntax allows this to work in a variety of ways ([Table Name],`Table Name`, and \"Table Name\"). None of these work and Hibernate throws a "Cannot find the expected secondary table" error. Attaching stacktrace.

If I create a view of the table with underscores, using wrapping characters are not required and the join works.

It should be noted that this works in 3.4.0.GA, the JBoss 5.1 default version. I've tried the versions listed and getting the same error.

Environment

4.2.18, SQLServer 2012

Status

Assignee

Unassigned

Reporter

Daniel Grant

Fix versions

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.3.11
5.0.0.Final
4.2.18

Priority

Major
Configure