I'll do the nedful later today. Meanwhile the changed
file is attached.
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 3:56 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [castor-user] Numeric overflow in SequenceKeyGenerator
Let me know if you have any problems with this approach.
Werner
--Original Message Text---
From: Kavathekar, Sunit
Date: Tue, 1 Jun 2004 23:23:56 -0700
Numeric overflow in SequenceKeyGenerator
Hi,
The SequenceKeyGenerator class in org.exolag.castor.jdo.drivers throws a numeric overflow sql exception when used with Oracle and a suquence set to a really high value (which is perfectly legitimate). The reason is that in the method generateKey the author has declared a variable called 'value' as an int and next sequence is retreived into this int with a getInt(). This obviously fails when the value is too large. I worked around the problem by changing value to a long and using a getLong() to retreive the next id. Is there a patch that fixes this problem ?
Thanks,
Sunit
SequenceKeyGenerator.java
Description: SequenceKeyGenerator.java
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
