Antwort: Re: Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Nikolaus . Bininda
Hi Armin, hi Gerhard, thank you for the answer. As I already wrote in my question, that i am using OJB since the last 1 and 1/2 years. I saved a lot of time using this mapping tool. In addition it is a good feeling to get answers to problems so fast. Nikolaus. -

Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Nikolaus . Bininda
Hi, i am using OJB since 1 and 1/2 years. This week i want to move from Version 1.0 to 1.0.1. I detect the following problem: I have two objects of two different classes (aClass and bClass) with the same base class. I use strings as primary keys. Object a has the string 'WR' as pk, object b

Re: Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread jecrotea
I've spotted this problem last week using Timestamp as primary Key. Here was my mail: >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

Re: Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Gerhard Grosse
Hi Armin, never mind, I should have posted this earlier. (And I did learn a lot from OJB, by the way :-) Ok, our buildKey method looks like this: private Object buildKey(Identity oid) { switch (cachingKeyType) { case 0 : return new OrderedTuple(oid); case 1 :

Re: Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Armin Waibel
Hi Gerhard and Nikolaus, > hashCode() as keys into a Hashtable. Since hash codes of different objects can > be equal, this sooner or later had to fail. > sorry this was my fault I only think about PK values of type Integer (here #hashCode and #equals has same result) and best performance, compl

Re: Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Gerhard Grosse
Hi Nikolaus, This is copied from ObjectCacheDefaultImpl: private Integer buildKey(Identity oid) { int key = 0; switch(cachingKeyType) { case 0: key = oid.hashCode(); break; case 1: key = new Ha

Problem with ObjectCacheDefaultImpl of 1.0.1

2004-11-18 Thread Nikolaus . Bininda
Hi, i am using OJB since 1 and 1/2 years. This week i tried to move from Version 1.0 to 1.0.1. I detected the following problem: I have two objects of two different classes (aClass and bClass) with the same base class. I use strings as primary keys. Object a has the string 'WR' as pk, object