[jboss-jira] [JBoss JIRA] (HIBERNATE-142) @JoinColumn annotation doesn't fully support column names requiring double-quotes

Steve Ebersole (JIRA) jira-events at lists.jboss.org
Thu Aug 29 10:21:03 EDT 2013


    [ https://issues.jboss.org/browse/HIBERNATE-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800280#comment-12800280 ] 

Steve Ebersole commented on HIBERNATE-142:
------------------------------------------

This is the Jira project for the integration of Hibernate into JBoss/WildFly.  For issues with Hibernate itself, use https://hibernate.atlassian.net/browse/HHH

You can report this issue there, or I'll "move" it when I get time.
                
> @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