Re: Problem with reading records having a PK with value 0 (not null)

2004-01-10 Thread Armin Waibel
Hi Danilo, >>> The problem lies in the support for primitive data types, since a >>> primitive type cannot be null, the value 0 is interpreted as null. >>> It seems that non primitive data types also react the same way (even >>> if they shouldn't, so from my point of view it is a bug) I checked in

Re: Problem with reading records having a PK with value 0 (not null)

2004-01-08 Thread Danilo Tommasina
Hi Armin, here a short example. create TABLE FOO ( TAB_ID INTEGER PRIMARY KEY ) and put an entry into the table with ID = 0 (from SQL not from OJB) /*/ repoistory.xml // public class Foo { public Integer tabId; //Add getter and setter } // some test code (...) Crite

Re: Problem with reading records having a PK with value 0 (not null)

2004-01-08 Thread Armin Waibel
Hi Danilo, Danilo Tommasina wrote: Hi, I reported the same issue some months ago... The problem lies in the support for primitive data types, since a primitive type cannot be null, the value 0 is interpreted as null. It seems that non primitive data types also react the same way (even if they

Re: Problem with reading records having a PK with value 0 (not null)

2004-01-08 Thread Armin Waibel
Hi Alex, did you use *primitive datatypes* for your PK fields? There is a "null-0 problem". When is a primitive field null? OJB assume it's null when the value is 0. Normally all sequence manager implementation start with value 1 to avoid these conflicts. If possible use real objects for PK fie

Re: Problem with reading records having a PK with value 0 (not null)

2004-01-08 Thread Danilo Tommasina
Hi, I reported the same issue some months ago... The problem lies in the support for primitive data types, since a primitive type cannot be null, the value 0 is interpreted as null. It seems that non primitive data types also react the same way (even if they shouldn't, so from my point of view i

Problem with reading records having a PK with value 0 (not null)

2004-01-08 Thread Alexandre Morin
Hi, It looks like OJB cannot fetch correctly records which have a BigInt primary key with value 0; at least in the following conditions; - I'm using RC5 - Have a table (here Locations) with a primary key Id with a auto-increment sequence - I'm using Oracle 9.2 - The table has a 1-N colle