Skip to content
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

Improve numeric mappings #1200

Merged
merged 4 commits into from
Feb 17, 2015
Merged

Improve numeric mappings #1200

merged 4 commits into from
Feb 17, 2015

Conversation

timowest
Copy link
Member

Fixes #1194 and #1025

timowest and others added 2 commits February 12, 2015 19:48
Conflicts:
	querydsl-sql/src/main/java/com/querydsl/sql/JDBCTypeMapping.java
	- changes near the class header
return numericTypes.get(key);
} else if (decimal <= 0) {
private static Class<?> getNumericClass(int total, int decimal) {
if (decimal <= 0) {
if (total > 18 || total == 0) {
return BigInteger.class;
} else if (total > 9 || total == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Total can only be 0 once.
Is this what was intended?

@@ -69,8 +69,7 @@ public void NumericTypes() {
// 2,0 -> Byte
// 0-1,0 -> Boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now we can update these comments, since Boolean isn't used in numeric types?

@Shredder121
Copy link
Member

In my opinion this is now also good to merge.

@timowest
Copy link
Member Author

Ok, good.

Shredder121 added a commit that referenced this pull request Feb 17, 2015
@Shredder121 Shredder121 merged commit bd4e93a into master Feb 17, 2015
@Shredder121 Shredder121 deleted the i1194 branch February 17, 2015 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default mapping for numeric types are incorrect
2 participants