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

Steve Ebersole (JIRA) issues at jboss.org
Thu Nov 19 10:10:00 EST 2015


     [ https://issues.jboss.org/browse/HIBERNATE-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HIBERNATE-142.
------------------------------------
    Resolution: Rejected


> @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 was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list