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

Wrong type in code generation #344

Closed
mgiammarco opened this Issue Feb 14, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@mgiammarco

With database postgresql 9.1 the jpa code generator converts correctly numeric->Short.
The sql code generator converts numeric->Boolean which is not correct.

Mario

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 14, 2013

Member

Which Querydsl version are you using? The latest version maps Boolean to BIT, BOOLEAN and NUMBER(1).

Member

timowest commented Feb 14, 2013

Which Querydsl version are you using? The latest version maps Boolean to BIT, BOOLEAN and NUMBER(1).

@mgiammarco

This comment has been minimized.

Show comment
Hide comment
@mgiammarco

mgiammarco Feb 14, 2013

I am using version 2.9.0. In postgres there is "numeric" type that I
suppose is like NUMBER. But is mapping number(1) to Boolean too aggressive?
I suppose I am in this case.

2013/2/14 Timo Westkämper notifications@github.com

Which Querydsl version are you using? The latest version maps Boolean to
BIT, BOOLEAN and NUMBER(1).


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/344#issuecomment-13575768.

I am using version 2.9.0. In postgres there is "numeric" type that I
suppose is like NUMBER. But is mapping number(1) to Boolean too aggressive?
I suppose I am in this case.

2013/2/14 Timo Westkämper notifications@github.com

Which Querydsl version are you using? The latest version maps Boolean to
BIT, BOOLEAN and NUMBER(1).


Reply to this email directly or view it on GitHubhttps://github.com/mysema/querydsl/issues/344#issuecomment-13575768.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 15, 2013

Member

The mapping range for numbers is this one

19-...,0   -> Long
6-18,0     -> Integer
4-5,0      -> Short
2-3,0      -> Byte
1,0        -> Boolean

17-...,?   -> BigDecimal
0-16,?     -> Double

I will make sure this is reasonable also for Postgres

Member

timowest commented Feb 15, 2013

The mapping range for numbers is this one

19-...,0   -> Long
6-18,0     -> Integer
4-5,0      -> Short
2-3,0      -> Byte
1,0        -> Boolean

17-...,?   -> BigDecimal
0-16,?     -> Double

I will make sure this is reasonable also for Postgres

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 15, 2013

Member

I just tuned the integer mappings to this

19-...,0   -> Long
6-18,0     -> Integer
3-5,0      -> Short
1-2,0      -> Byte
0          -> Boolean
Member

timowest commented Feb 15, 2013

I just tuned the integer mappings to this

19-...,0   -> Long
6-18,0     -> Integer
3-5,0      -> Short
1-2,0      -> Byte
0          -> Boolean

timowest added a commit that referenced this issue Feb 15, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 20, 2013

Member

Released in 3.0.0.BETA2

Member

timowest commented Feb 20, 2013

Released in 3.0.0.BETA2

@timowest timowest closed this Feb 20, 2013

@timowest timowest added this to the 3.0.0 milestone Apr 14, 2014

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