I used TIMESTAMP JDBC type for my column, and java.sql.Timestamp for my
Java entity. That's what you like to know?

-----------------------------------------------------------------------------

Jean-Francois Croteau
Services Informatiques
IBM Canada Lt�e (Bromont)
E-mail : [EMAIL PROTECTED]
T�l. : (450) 534-6556




                                                                       
             [EMAIL PROTECTED]                                         
             c.eu.int                                                  
                                                                        To
             2004-11-15 11:48          [EMAIL PROTECTED]          
                                                                        cc
                                                                       
             Please respond to                                     Subject
             "OJB Users List"          RE: Timestamp and caching?      
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       




Hi Jean-Francois,

What is your mapping ?
It seems that there is a truncate somewhere, but it seems to be at the
field-descriptor level.
It seems that the precision of the object used for primary key (and then
caching) does not go further than the second.
Personally, I use the TIMESTAMP jdbc type, with a conversion class that
converts my timestamp into a Date.

David WIESZTAL.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 4:45 PM
To: [EMAIL PROTECTED]
Subject: Timestamp and caching?


Hi everyone.
      I have a DB2 table that has a Timestamp column as primary key. My OJB
code was just right with the OJB 1.0.0 version. I've tried to upgrade the
OJB to the 1.0.1 version. For some reason (I suspect caching), my select
query doesn't work anymore. Here is some data:

Here is the DB2 table. See that in 2 differents seconds, we have 6 events:
4 in the first second and 2 in the second.

EVENT_TMST (Primary Key)   USERID     EVENT_MSG
-------------------------- ----------
----------------------------------------------
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.760608 SLALIBER   Message #2
2004-11-05 11:08:21.798037 TITI       Message #3
2004-11-05 11:08:21.829017 TOTO       Message #4
2004-11-05 11:08:22.080724 TYTY       Message #5
2004-11-05 11:08:22.180625 TUTU       Message #5

If I use my OJB version 1.0.1 query , I obtain this result :
EVENT_TMST (Primary Key)   USERID     EVENT_MSG
-------------------------- ----------
----------------------------------------------
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:22.080724 TYTY       Message #5
2004-11-05 11:08:22.080724 TYTY       Message #5

I red this in the changes.txt file from version 1.0.1:

CHANGES:
- Performance improvement in RsIterator, first only map PK values from the
  result set and check against the cache. If no match map all field values
  from result set to internal Map class (old version always maps all values
  from the result set to the internal Map class).

So I tried to add "another" primary key in my repository.xml file and it
worked. So I guess something is truncated in the caching hashmap. Any
though on this?

----------------------------------------------------------------------------

-

Jean-Francois Croteau
IBM Canada Lt�e (Bromont)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to