2 Replies Latest reply on Jan 31, 2002 4:42 AM by lbroudoux

    Date persistence in Oracle 8 (Jboss 2.4.1)

    lbroudoux

      Hello,

      I'm using JBoss 2.4.1 with Oracle 8 database and Oracle JDBC drivers (classes12.zip).
      I'm trying to persist date fields of my CMP beans (using JAWS) and I have noticed strange behaviour
      (I think due to java.sql.Date type mapping).

      When I create a new bean with a creation date field, and retrieve it immediatly (before store operation in db),
      this date contains informations on hour, minutes and milliseconds.
      But, once JBoss has written this bean in storage, these informations are no longer available ! (equal to "0")

      I can only retrieve day, month and year of creation !
      I can see this clearly by calling getTime() method and seeing that its value has been rounded !

      Is there a workaround to this problem ?
      Is it possible to change Oracle 8 sql-type mapping ?

      Thank you for your help,
      Regards,

      Laurent