5 Replies Latest reply on May 10, 2007 10:53 AM by Pete Muir

    seam-gen vs. Oracle CHAR(n) and FLOAT

    Steve Harris Newbie

      A couple of type-mapping problems with seam-gen/hibernate and an Oracle database:
      CHAR(200) in the database becomes a String entity property
      FLOAT in the database becomes a double entity property

      These cause exceptions during deployment. I can probably fix these in the seam-gen.reveng.xml file's typemapping section, but for the character field I'd really rather that it be a String in my entity instead of a Char[] (if that's what it wants). Is there a bettter way to fix these? Why's hibernate being so picky? I thought jdbc at least would silently do these conversions anyway...

      The deployment exception (for the CHAR(200) column):

      WARN [ServiceController] Problem starting service persistence.units:ear=Janus.ear,unitName=DevSchema
      javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: CODE_CD, expected: varchar2(200 char)
       at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)