mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1243 - Add IDENTITY support for Oracle platform (since 12c Oracle supports auto generated identity)
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ import io.ebean.Ebean;
|
||||
import io.ebean.config.ServerConfig;
|
||||
import io.ebean.config.dbplatform.IdType;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServerPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServerPlatform;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.IdentityType;
|
||||
import io.ebeaninternal.server.core.PlatformDdlBuilder;
|
||||
@@ -222,7 +222,7 @@ public class PlatformDdl_AlterColumnTest {
|
||||
|
||||
assertEquals(oraDdl.useIdentityType(null), IdType.SEQUENCE);
|
||||
assertEquals(oraDdl.useIdentityType(IdentityType.SEQUENCE), IdType.SEQUENCE);
|
||||
assertEquals(oraDdl.useIdentityType(IdentityType.IDENTITY), IdType.SEQUENCE);
|
||||
assertEquals(oraDdl.useIdentityType(IdentityType.IDENTITY), IdType.IDENTITY);
|
||||
assertEquals(oraDdl.useIdentityType(IdentityType.GENERATOR), IdType.GENERATOR);
|
||||
assertEquals(oraDdl.useIdentityType(IdentityType.EXTERNAL), IdType.EXTERNAL);
|
||||
}
|
||||
|
||||
@@ -3,25 +3,46 @@ package org.tests.transaction;
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.Ebean;
|
||||
import io.ebean.Transaction;
|
||||
|
||||
|
||||
import io.ebean.annotation.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import org.junit.Test;
|
||||
import org.tests.model.basic.ESimple;
|
||||
|
||||
/**
|
||||
* This test tests a strange bug in the 6.2.0. sqlserver JDBC driver.
|
||||
* (Version 6.1.7.jre8-preview works)
|
||||
*
|
||||
*
|
||||
* https://github.com/Microsoft/mssql-jdbc/pull/374
|
||||
*
|
||||
*
|
||||
* @author Roland Praml, FOCONIS AG
|
||||
*/
|
||||
public class TestSqlServerBatch extends BaseTestCase {
|
||||
|
||||
@IgnorePlatform(value = Platform.SQLSERVER)
|
||||
@Test
|
||||
public void testAggressiveBatch() throws InterruptedException {
|
||||
public void testBasicIdentityBatch() {
|
||||
|
||||
Transaction txn = Ebean.beginTransaction();
|
||||
try {
|
||||
txn.setBatchMode(true);
|
||||
txn.setBatchSize(3);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
ESimple model = new ESimple();
|
||||
model.setName("baz "+i);
|
||||
Ebean.save(model);
|
||||
}
|
||||
|
||||
txn.commit();
|
||||
|
||||
} finally {
|
||||
txn.end();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAggressiveBatch() {
|
||||
|
||||
|
||||
Transaction txn = Ebean.beginTransaction();
|
||||
try {
|
||||
txn.setBatchMode(true);
|
||||
|
||||
Reference in New Issue
Block a user