1 Reply Latest reply on Mar 17, 2003 11:51 AM by L.G.

    use Date as pk in jboss CMP ?

    lancelot Newbie

      Sorry for my English, hope you can understand my question :(
      I'm using JDK1.3.1, Jboss 2.4.3 with tomcat 3, SQL server 2000 and MS SQL server JDBC driver.
      I have a CMP whose primary key is a java.util.Date, corresponding column in SQL Server is DateTime. I can find the CMP bean using findByPrimaryKey(new Date(1047699318955)), but when I invoke getTime() on the date, it returns 1047699318000, the millisecond is lost. The problem cause me big trouble.
      Is there anybody who can give me some advice?
      Thanks a lot :)