[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:43:04 EDT 2013
[ https://issues.jboss.org/browse/HIBERNATE-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800299#comment-12800299 ]
Paul Spinelli commented on HIBERNATE-142:
-----------------------------------------
My bad. Since I have a workaround, I'm in no rush. If you can move it when you do have time, I'd be happy with that. Thanks!
> @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