1 Reply Latest reply on Nov 27, 2007 5:59 PM by Shane Bryzak

    Char vs. VarChar

    Vince Cordaro Newbie

      For some reason when a column in my postgres database is defined as CHAR(*), it will not resolve properly when validating the generated bean against the database. I ended up having to change my datatypes to VARCHARS. Anyone know anything about this?

      11:56:48,412 INFO [TableMetadata] table found: adlib.profile_changelog
      11:56:48,412 INFO [TableMetadata] columns: [pcl_text, pcl_id, pcl_flags, pcl_prof_id, pcl_datetime]
      11:56:48,414 WARN [ServiceController] Problem starting service persistence.units:ear=adlib_persistence_generator.ear,unitName=adlib_persistence_generator
      javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: pcl_flags, expected: varchar(10)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
      at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)