mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Testing nuodb 4.3.2, but it isn't supporting getGeneratedKeys for jdbc batch inserts
That breaks a lot of tests
This commit is contained in:
+16
@@ -13,6 +13,22 @@ public class NuoDbDdl extends PlatformDdl {
|
||||
this.dropConstraintIfExists = "drop constraint";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createSequence(String sequenceName, DdlIdentity identity) {
|
||||
StringBuilder sb = new StringBuilder("create sequence ");
|
||||
sb.append(quote(sequenceName));
|
||||
int start = identity.getStart();
|
||||
if (start > 0) {
|
||||
sb.append(" ").append(sequenceStartWith).append(" ").append(start);
|
||||
}
|
||||
int cache = identity.getCache();
|
||||
if (cache > 0) {
|
||||
sb.append(" quantum size ").append(cache);
|
||||
}
|
||||
sb.append(";");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTableComment(DdlBuffer apply, String tableName, String tableComment) {
|
||||
// do nothing
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@
|
||||
<dependency>
|
||||
<groupId>com.nuodb.jdbc</groupId>
|
||||
<artifactId>nuodb-jdbc</artifactId>
|
||||
<version>22.0.0</version>
|
||||
<version>23.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -7,45 +7,15 @@ import org.tests.model.basic.ESimple;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class TestSimpleIdInsert extends BaseTestCase {
|
||||
class TestSimpleIdInsert extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
void test() {
|
||||
ESimple e = new ESimple();
|
||||
e.setName("name");
|
||||
|
||||
DB.save(e);
|
||||
|
||||
assertNotNull(e.getId());
|
||||
|
||||
}
|
||||
|
||||
// // This test fails with jdbc drivers that don't
|
||||
// // support batch insert with getGeneratedKeys
|
||||
// public void testJdbcBatch() {
|
||||
//
|
||||
// GlobalProperties.put("datasource.default", "hsqldb");
|
||||
// GlobalProperties.put("ebean.classes", ESimple.class.getName());
|
||||
//
|
||||
// Transaction transaction = DB.beginTransaction();
|
||||
// try {
|
||||
// transaction.setBatchMode(true);
|
||||
// transaction.setLogLevel(LogLevel.SQL);
|
||||
// ESimple e = new ESimple();
|
||||
// e.setName("name");
|
||||
// DB.save(e);
|
||||
//
|
||||
// ESimple e2 = new ESimple();
|
||||
// e2.setName("name2");
|
||||
// DB.save(e2);
|
||||
// transaction.commit();
|
||||
//
|
||||
// Assert.assertNotNull(e.getId());
|
||||
// Assert.assertNotNull(e2.getId());
|
||||
//
|
||||
// } finally {
|
||||
// DB.endTransaction();
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
ebean.test.platform=nuodb
|
||||
ebean.test.dbName=testdb
|
||||
ebean.test.nuodb.version=latest
|
||||
ebean.test.nuodb.version=4.3.2
|
||||
|
||||
Reference in New Issue
Block a user