FIX: tableName detection for native statements on SQLServer (#1494)

This commit is contained in:
Roland Praml
2018-09-26 20:54:22 +12:00
committed by Rob Bygrave
parent 5522d56e8d
commit fe71c7cc4e
2 changed files with 4 additions and 2 deletions
@@ -417,7 +417,9 @@ class CQueryBuilder {
BeanDescriptor<?> desc = request.getBeanDescriptor();
try {
PreparedStatement statement = connection.prepareStatement(sql);
// For SqlServer we need either "selectMethod=cursor" in the connection string or fetch explicitly a cursorable
// statement here by specifying ResultSet.CONCUR_UPDATABLE
PreparedStatement statement = connection.prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
predicates.bind(statement, connection);
ResultSet resultSet = statement.executeQuery();
@@ -139,7 +139,7 @@ public class TestNativeSqlBasic extends BaseTestCase {
* Oracle does not support getTableName() via JDBC resultSet meta data
*/
@Test
@IgnorePlatform({Platform.SQLSERVER, Platform.ORACLE}) // does only work in 'cursor' mode!
@IgnorePlatform({Platform.ORACLE})
public void partialAssoc() {
ResetBasicData.reset();