[hibernate-issues] [Hibernate-JIRA] Created: (EJB-429) Wrong column type: COUNTRYCODE, expected: varchar2(4 char)

Souvik Sutradhar (JIRA) noreply at atlassian.com
Mon Apr 20 04:37:19 EDT 2009


Wrong column type: COUNTRYCODE, expected: varchar2(4 char)
----------------------------------------------------------

                 Key: EJB-429
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-429
             Project: Hibernate Entity Manager
          Issue Type: Bug
    Affects Versions: 3.2.1
         Environment: eclips 3.4.1, Jboss 4.2.2 GA, Jboss Seam 2.1.1 GA
            Reporter: Souvik Sutradhar


I'm using an Entity bean that look something like this...

@Entity
@Name("uibsCountry")
@Table(name = "UIBSCOUNTRIES", schema = "GHANATELFIXED", uniqueConstraints = {
		@UniqueConstraint(columnNames = "COUNTRYCODE"),
		@UniqueConstraint(columnNames = "COUNTRYDESC") })
public class Uibscountries implements java.io.Serializable {
........
........
@Column(name = "COUNTRYCODE", unique = true, nullable = false, length = 4)
	@NotNull
	@Length(max = 4)
	public String getCountrycode() {
		return this.countrycode;
	}

..............
.............

In database column "COUNTRYCODE" is defined as char(4).
When i deploy the application the deployement fails because of this error: 
  javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: COUNTRYCODE, expected: varchar2(4 char).

I can not change the datatype of the field...

Quick reply needed...
Thanks

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