mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-30 20:52:22 -05:00
Attempt to fix testGetGeneratedKeysSingleLong for oracle
This commit is contained in:
parent
268b0500f1
commit
1003819064
@ -333,7 +333,7 @@ public class QueryMapper implements JdbcMapper {
|
|||||||
public Long insertGetGeneratedKey(final String sql, final Object... bindObjects) throws SQLException {
|
public Long insertGetGeneratedKey(final String sql, final Object... bindObjects) throws SQLException {
|
||||||
PreparedStatement ps = null;
|
PreparedStatement ps = null;
|
||||||
try {
|
try {
|
||||||
ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
|
ps = conn.prepareStatement(sql, new int[]{1}); // todo: create this array private static final
|
||||||
return this.insertGetGeneratedKey(ps, bindObjects);
|
return this.insertGetGeneratedKey(ps, bindObjects);
|
||||||
} finally {
|
} finally {
|
||||||
tryClose(ps);
|
tryClose(ps);
|
||||||
|
@ -492,7 +492,7 @@ public class QueryMapperTest {
|
|||||||
")");
|
")");
|
||||||
} else if (isWrapperFor(qm.getConnection(), oracleConnection)) {
|
} else if (isWrapperFor(qm.getConnection(), oracleConnection)) {
|
||||||
qm.executeUpdate("CREATE TABLE a_thaoeu_table(\n" +
|
qm.executeUpdate("CREATE TABLE a_thaoeu_table(\n" +
|
||||||
" a_thaoeu_table_no INTEGER PRIMARY KEY,\n" +
|
" a_thaoeu_table_no NUMBER PRIMARY KEY,\n" +
|
||||||
" a_thaoeu_table_val NUMERIC\n" +
|
" a_thaoeu_table_val NUMERIC\n" +
|
||||||
")");
|
")");
|
||||||
qm.executeUpdate("CREATE SEQUENCE a_thaoeu_table_seq\n" +
|
qm.executeUpdate("CREATE SEQUENCE a_thaoeu_table_seq\n" +
|
||||||
|
Loading…
Reference in New Issue
Block a user