HHH-6775: Changed AbstractTransactSQLDialect.getNullColumnString() to return empty string, which matches some of the other dialects and allows the DB to auto-determine a column's nullability in certain situations
This commit is contained in:
parent
cbbc786f18
commit
d4b47e78ba
|
@ -129,7 +129,7 @@ abstract class AbstractTransactSQLDialect extends Dialect {
|
||||||
return "add";
|
return "add";
|
||||||
}
|
}
|
||||||
public String getNullColumnString() {
|
public String getNullColumnString() {
|
||||||
return " null";
|
return "";
|
||||||
}
|
}
|
||||||
public boolean qualifyIndexName() {
|
public boolean qualifyIndexName() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -42,11 +42,11 @@ public class JoinColumnOverrideTest extends BaseUnitTestCase {
|
||||||
log.debug(s);
|
log.debug(s);
|
||||||
}
|
}
|
||||||
String expectedSqlPointyTooth = "create table PointyTooth (id numeric(128,0) not null, " +
|
String expectedSqlPointyTooth = "create table PointyTooth (id numeric(128,0) not null, " +
|
||||||
"bunny_id numeric(128,0) null, primary key (id))";
|
"bunny_id numeric(128,0), primary key (id))";
|
||||||
assertEquals("Wrong SQL", expectedSqlPointyTooth, schema[1]);
|
assertEquals("Wrong SQL", expectedSqlPointyTooth, schema[1]);
|
||||||
|
|
||||||
String expectedSqlTwinkleToes = "create table TwinkleToes (id numeric(128,0) not null, " +
|
String expectedSqlTwinkleToes = "create table TwinkleToes (id numeric(128,0) not null, " +
|
||||||
"bunny_id numeric(128,0) null, primary key (id))";
|
"bunny_id numeric(128,0), primary key (id))";
|
||||||
assertEquals("Wrong SQL", expectedSqlTwinkleToes, schema[2]);
|
assertEquals("Wrong SQL", expectedSqlTwinkleToes, schema[2]);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
|
|
@ -65,11 +65,11 @@ public class JoinColumnOverrideTest extends BaseUnitTestCase {
|
||||||
log.debug(s);
|
log.debug(s);
|
||||||
}
|
}
|
||||||
String expectedSqlPointyTooth = "create table PointyTooth (id numeric(128,0) not null, " +
|
String expectedSqlPointyTooth = "create table PointyTooth (id numeric(128,0) not null, " +
|
||||||
"bunny_id numeric(128,0) null, primary key (id))";
|
"bunny_id numeric(128,0), primary key (id))";
|
||||||
assertEquals("Wrong SQL", expectedSqlPointyTooth, schema[1]);
|
assertEquals("Wrong SQL", expectedSqlPointyTooth, schema[1]);
|
||||||
|
|
||||||
String expectedSqlTwinkleToes = "create table TwinkleToes (id numeric(128,0) not null, " +
|
String expectedSqlTwinkleToes = "create table TwinkleToes (id numeric(128,0) not null, " +
|
||||||
"bunny_id numeric(128,0) null, primary key (id))";
|
"bunny_id numeric(128,0), primary key (id))";
|
||||||
assertEquals("Wrong SQL", expectedSqlTwinkleToes, schema[2]);
|
assertEquals("Wrong SQL", expectedSqlTwinkleToes, schema[2]);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class NullablePrimaryKeyTest {
|
||||||
for (String s : schema) {
|
for (String s : schema) {
|
||||||
log.debug(s);
|
log.debug(s);
|
||||||
}
|
}
|
||||||
String expectedMappingTableSql = "create table personAddress (address_id numeric(19,0) null, " +
|
String expectedMappingTableSql = "create table personAddress (address_id numeric(19,0), " +
|
||||||
"person_id numeric(19,0) not null, primary key (person_id))";
|
"person_id numeric(19,0) not null, primary key (person_id))";
|
||||||
Assert.assertEquals( "Wrong SQL", expectedMappingTableSql, schema[2] );
|
Assert.assertEquals( "Wrong SQL", expectedMappingTableSql, schema[2] );
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue