[jboss-jira] [JBoss JIRA] (HIBERNATE-142) @JoinColumn annotation doesn't fully support column names requiring double-quotes
Paul Spinelli (JIRA)
jira-events at lists.jboss.org
Thu Aug 29 10:17:03 EDT 2013
Paul Spinelli created HIBERNATE-142:
---------------------------------------
Summary: @JoinColumn annotation doesn't fully support column names requiring double-quotes
Key: HIBERNATE-142
URL: https://issues.jboss.org/browse/HIBERNATE-142
Project: Hibernate Integration
Issue Type: Bug
Environment: Hibernate 4.2.4-Final
Eclipse Juno
J2EE 3.0 Web app
Reporter: Paul Spinelli
Assignee: Steve Ebersole
Priority: Minor
Due to the way an existing database schema has been configured, my JPA annotations (using Hibernate as my provider) all required that table names/column names be double-quoted:
(e.g. String ID_COLUMN_NAME = "\"Id\"";)
This does not pose a problem EXCEPT when using the @JoinColumn annotation (specifically, the 'referencedColumnName' attribute). This DOES NOT work (I get an error that the logical column name cannot be found):
@JoinColumn(name=ID_COLUMN_NAME, referencedColumnName=ID_COLUMN_NAME)
However, this DOES work:
@JoinColumn(name=ID_COLUMN_NAME, referencedColumnName="`Id`")
It seems that the 'name' attribute supports double-quotes while the 'referencedColumnName' attribute does not. Is there a reason it should not?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list