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

Prakash G (JIRA) noreply at atlassian.com
Wed Apr 14 15:56:04 EDT 2010


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