You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Per-Olof Norén <pe...@alma.nu> on 2003/02/18 18:01:30 UTC

[PATCH] SequenceManagerNextValImpl support for very large sequence numbers

Hi all,
I´m new to this list, so please correct me if this list isn´t the 
correct place for the diff-file.

Problem:
When using an Oracle (8.1.7) sequence for generating keys for a 
"NUMERIC(14,0)" field, an SQLException claiming number spill is thrown 
from the oracle jdbc driver when rs.getInt is called. This is because 14 
digit numbers are too large for java datatype int.
Looking at PostgreSQL´s sequences (which is similar  to Oracle´s) one 
finds that sequences returns bigint, or the like.

Solution:
This patch makes the SequenceManagerNextVal read the sequence as long 
and handle all calls as long internally.
This patch has been tested on Oracle 8.1.7.

Please let me know if there is other requirements that  must be met to 
get this patch applied.

Regards,

Per-Olof Norén
Curalia AB
Stockholm, Sweden