Reenable quoting for SqlServerDialect.
Quoting is important since it allows use of keywords as names. We do not change the letter casing. In a default setup the database does not care since it is case-insensitive. If configured to be case-sensitive it makes sense to pass on what ever letter casing there is, since you seem to care. Closes #1216 See #914
This commit is contained in:
@@ -262,7 +262,7 @@ class SqlGeneratorUnitTests {
|
||||
|
||||
String sql = sqlGenerator.getFindAll(Sort.by(new Sort.Order(Sort.Direction.ASC, "name", Sort.NullHandling.NULLS_LAST)));
|
||||
|
||||
assertThat(sql).endsWith("ORDER BY dummy_entity.x_name ASC");
|
||||
assertThat(sql).endsWith("ORDER BY \"dummy_entity\".\"x_name\" ASC");
|
||||
}
|
||||
|
||||
@Test // DATAJDBC-101
|
||||
|
||||
@@ -44,6 +44,9 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
}
|
||||
};
|
||||
|
||||
private static final IdentifierProcessing IDENTIFIER_PROCESSING = IdentifierProcessing
|
||||
.create(IdentifierProcessing.Quoting.ANSI, IdentifierProcessing.LetterCasing.AS_IS);
|
||||
|
||||
protected SqlServerDialect() {}
|
||||
|
||||
@Override
|
||||
@@ -162,7 +165,7 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
|
||||
@Override
|
||||
public IdentifierProcessing getIdentifierProcessing() {
|
||||
return IdentifierProcessing.NONE;
|
||||
return IDENTIFIER_PROCESSING;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user