0 Replies Latest reply on Aug 1, 2007 10:57 PM by John Woo

    how to use timestamp

    John Woo Newbie


      I'm using mssql for jboss ejb 3, I've tried

      private java.util.Date myDate;
      // or private java.sql.Timestamp

      or @Column(name="my_date")
      private Date creatingDate;

      mapping to a table with timestamp column my_date

      but when persist this entity, without setDate, got

      Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column

      the my_date is nullable, desn't need a value.

      Can anyone tell me how to fix it?