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

fix for testing autogenerated keys #135

Merged
merged 1 commit into from
Jul 5, 2013
Merged

Conversation

benilovj
Copy link
Member

@benilovj benilovj commented Jul 4, 2013

it seems that ResultSet#getObject doesn't reliably return an appropriate
datatype when fetching auto-generated keys after an insert statement
eg for Derby, even if the autogenerated column has type INT or BIGINT,
a java.util.BigDecimal is still returned.

The change works around this problem by using one of the ResultSet#get<X>
methods to cast the result to the appropriate datatype, and adds tests for
this problem.

it seems that ResultSet#getObject doesn't reliably return an appropriate
datatype when fetching auto-generated keys after an insert statement
eg for Derby, even if the autogenerated column has type INT or BIGINT,
a java.util.BigDecimal is still returned.

The change works around this problem by using one of the ResultSet#get<X>
methods to cast the result to the appropriate datatype, and adds tests for
this problem.
benilovj added a commit that referenced this pull request Jul 5, 2013
@benilovj benilovj merged commit 601ace2 into master Jul 5, 2013
@benilovj benilovj deleted the autogenerated-key-type-fix branch July 5, 2013 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant