New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle numeric type mapping with no specifications of precision / scale #535

Closed
dmiorandi opened this Issue Oct 31, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@dmiorandi

I've found another issue on Oracle numeric type mapping in querydsl-sql generator.
When I use NUMERIC with no specification of size and digits value should be mapped on a Long value, but i get a Double.

http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#autoId14

in JDBCTypeMapping class in method getNumericClass, input is size=0, digits=-127
and output is Double.
The following code

       } else if (digits == 0) {
            if (size > 18) {
                return Long.class;
            } else if (size > 5) {

should be modified into something like this

       } else if (digits <= 0) {
            if (size > 18 || size == 0) {
                return Long.class;
            } else if (size > 5) {

In this way default NUMERIC is mapped to Long.

timowest added a commit that referenced this issue Oct 31, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 17, 2013

Member

Released in 3.3.0.BETA1

Member

timowest commented Nov 17, 2013

Released in 3.3.0.BETA1

@timowest timowest closed this Nov 17, 2013

@timowest timowest added this to the 3.3.0 milestone Apr 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment