2

I have a custom VARRAY type:

create or replace TYPE ARRAY_NUMBERS AS VARRAY(1000000) OF NUMBER;

when I retrieve a result set of the ARRAY_NUMBERS type, JAVA is interpreting the numbers as java.math.BigDecimal, however I am expecting it to be a Long. Is there a way to do this?

 Error: 
 Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'ids' of 'class com.myproject.NumberValue' with value '[Ljava.math.BigDecimal;@d2037d' Cause: java.lang.IllegalArgumentException: argument type mismatch
1
  • 1
    post your ibatis mapping file Commented Dec 18, 2015 at 1:04

1 Answer 1

1

Use the longValue() method of java.math.BigDecimal to loop through the array and convert each number you have received from the database to a long type.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I guess I didn't ask the question correctly. What I really need is for it to be interpreted as a long before that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.