[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-839) Ejb3JoinColumn.linkValueUsingDefaultColumnNaming messes up logical/physical column name

Marat Radchenko (JIRA) noreply at atlassian.com
Tue Jun 2 06:12:15 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33304#action_33304 ] 

Marat Radchenko commented on ANN-839:
-------------------------------------

Possibly related to ANN-718

> Ejb3JoinColumn.linkValueUsingDefaultColumnNaming messes up logical/physical column name
> ---------------------------------------------------------------------------------------
>
>                 Key: ANN-839
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-839
>             Project: Hibernate Annotations
>          Issue Type: Bug
>          Components: binder
>    Affects Versions: 3.4.0.GA
>            Reporter: Marat Radchenko
>
> Ejb3JoinColumn.java pretends columnName variable (line 270) is a physical column name (it is proved on line 323).
> However.
> 1. initMappingColumn is called with applyNamingStrategy=false
> 2. It in turn calls redefineColumnName (still applyNamingStrategy=false).
> 3. applyNamingStrategy=false -> if statement on line 186 is evaluated to false
> 4. line 198, original value of columnName is used as _physical_ column name.
> So what we get is the same string used as both logical and physical name without any consulting with NamingStrategy. This behavior completely breaks our setup (we want to quote all physical column names).
> Proposed solution:
> 1. Rename columnName to logicalColumnName so assumptions about its usage are more explicit.
> 2. Call initMappingColumn with applyNamingStrategy=true

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list