[hibernate-issues] [Hibernate-JIRA] Resolved: (HCANN-19) Issue with @Column( ) annotation

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Apr 15 05:50:02 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HCANN-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved HCANN-19.
-----------------------------------

    Resolution: Rejected

This is not the right project, use HHH. But what you are describing is *very* unlikely out of the box. Maybe your dev team is using a NamingStrategy impl that messes around. If you think that's not the case, please open a jira issue on HHH with a reproducible test case attached.

> Issue with @Column( ) annotation
> --------------------------------
>
>                 Key: HCANN-19
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HCANN-19
>             Project: Hibernate Commons Annotations
>          Issue Type: Bug
>            Reporter: Prakash  G
>
> We all know that when we don't map a attribute with column in the DB using @Column() annotation, hibernate by default splits the variable based on the words and constructs the column name to be mapped.
> Example 
> if I have something like 
> private BigDecimal netLiqPercent; 
> then hibernate constructs the column name as net_liq_percent.
> But when we use 
> 	@Column(name ="Account_NetLiq_Percent", nullable=true, updatable=true, insertable=true)	
> 	private BigDecimal netLiqPercent; 
> Hibernate should not try to resolve / construct column, instead it should use whatever the column name is being specified.
> However its not so! In the above case hibernate tries to look for column "account_net_liq_percent" and gives unknown column exception.
> I believe when we explicitly map the column hibernate should use it.
> but it works if I change column name to all CAPS..!
> I think this needs to be addressed.
>  

-- 
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