[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-320) Wrong column type: areccod, expected: varchar(2)

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sun Oct 28 22:25:38 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28607 ] 

Emmanuel Bernard commented on EJB-320:
--------------------------------------

We don't think char should be mapped to String by default.

> Wrong column type: areccod, expected: varchar(2)
> ------------------------------------------------
>
>                 Key: EJB-320
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-320
>             Project: Hibernate Entity Manager
>          Issue Type: Bug
>          Components: EntityManager
>    Affects Versions: 3.2.1
>         Environment: Informix IDS 10 on Linux, JBoss 4.2GA, JBoss Seam 2.0 CR2
>            Reporter: Luis Medalhas
>            Priority: Critical
>
> I'm using an Entity bean that look something like this
> @Entity
> @Table(name="ep3prj_t")
> public class Project {
> 	@Id
> 	private int aprjkey;
> 	
> 	@Length(max=2)
> 	private String areccod;
> ...
> In the database the column "areccod" of the table "ep3prj_t" is defined as char(2).
> When i deploy the application the deployement fails because of this error:
>   javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: areccod, expected: varchar(2)
> I think using a String should be valid for the types CHAR and VARCHAR , i cannot change the data type because this database is mantained by the customer.
> Regards.

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