Copy link to clipboard
Copied
entityLoad('Account') throws this error,
Error while loading entity
java.sql.SQLException: [Macromedia][Oracle JDBC Driver]Numeric overflow.
However entityLoad('Account',1) returns the proper record.
I am using oracle 10g as a datebase.
Is this a bug with oracle? entityLoad('Account') should return all my accounts.
Copy link to clipboard
Copied
How many records are we talking, and what's the definition of the entity?
--
Adam
Copy link to clipboard
Copied
Just over 1000
Now heres a kicker, entityLoad('Account',{},'account_number asc',{offset=21, maxResults=10}) returns the proper 10 records
but it still does not like it when i do
entityLoad('Account')
Copy link to clipboard
Copied
What if you use the offset & maxrows settings to return the whole lot? Does that work?
If not, it might be bung data: try paging through all the records to see if one page in particular gives you a problem, then you can maybe narrow it down to a specific record.
Can you profile the SQL that Hibernate is passing to the DB? Anything unexpected about it?
--
Adam
Copy link to clipboard
Copied
I'd also go further and take the SQL being generated and try running it against Oracle directly (in your SQL tool, outside of CF) to see if anything changes.
If you're not sure how to enable logging of the generated SQL, have a look here.
Copy link to clipboard
Copied
It would probably also help to see the config for Account, so we can have a better idea if you're doing something funky with a formula or something.
Copy link to clipboard
Copied
Sorry for late reply , been away for a few days,
I just added ormType=interger to my cfproprty that was the primary key and now all is good. I guess I should not assume an example that works fine for a diff database will work exactly the same on my database. I will make sure i define ormtype for every property.
Copy link to clipboard
Copied
For some reason I am having the same error event though I checked the ormType="integer". My database is Oracle 19c and the primary key data type is "number". Thanks.
Copy link to clipboard
Copied
A number data type in Oracle is a float, not an integer. It's not the sort of thing you'd use as a surrogate key, but rather perhaps as a natural key. Anyway, you should be able to choose ormType="float" instead.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Yeah it's giving me same error. I removed it all only very basic like this:
Copy link to clipboard
Copied
I found the solution by setting the ormtype as "big_decimal"
Copy link to clipboard
Copied
@joseph.yan , please start a new thread of your own. NicholasDee's original thread is more than 10 years old. That is a long time in software. ColdFusion, Hibernate and Oracle have moved on since then.
In any case, thanks for sharing your findings.
Copy link to clipboard
Copied
@BKBK oops sorry I thought it's easier to follow up here. I make it a note next time to start a new thread. Thank you.