|
26 | 26 | import org.hibernate.dialect.H2Dialect;
|
27 | 27 | import org.hibernate.dialect.MySQLDialect;
|
28 | 28 | import org.hibernate.dialect.Oracle8iDialect;
|
| 29 | +import org.hibernate.dialect.SQLServer2008Dialect; |
| 30 | +import org.hibernate.dialect.SQLServer2012Dialect; |
| 31 | +import org.hibernate.dialect.SQLServerDialect; |
29 | 32 | import org.hibernate.engine.spi.SessionImplementor;
|
30 | 33 | import org.hibernate.persister.collection.CollectionPersister;
|
31 | 34 | import org.hibernate.persister.collection.QueryableCollection;
|
@@ -80,10 +83,10 @@ public void testOrderByOnIdClassProperties() throws Exception {
|
80 | 83 |
|
81 | 84 | @Test
|
82 | 85 | @TestForIssue(jiraKey = "HHH-465")
|
83 |
| - @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class }, |
| 86 | + @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class, SQLServer2008Dialect.class }, |
84 | 87 | comment = "By default H2 places NULL values first, so testing 'NULLS LAST' expression. " +
|
85 |
| - "For MySQL testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
86 |
| - "MySQL does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
| 88 | + "For MySQL and SQL Server 2008 testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
| 89 | + "MySQL and SQLServer 2008 does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
87 | 90 | public void testAnnotationNullsFirstLast() {
|
88 | 91 | Session session = openSession();
|
89 | 92 |
|
@@ -139,10 +142,10 @@ public void testAnnotationNullsFirstLast() {
|
139 | 142 |
|
140 | 143 | @Test
|
141 | 144 | @TestForIssue(jiraKey = "HHH-465")
|
142 |
| - @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class }, |
| 145 | + @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class, SQLServer2008Dialect.class }, |
143 | 146 | comment = "By default H2 places NULL values first, so testing 'NULLS LAST' expression. " +
|
144 |
| - "For MySQL testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
145 |
| - "MySQL does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
| 147 | + "For MySQL and SQL Server 2008 testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
| 148 | + "MySQL and SQL Server 2008 does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
146 | 149 | public void testCriteriaNullsFirstLast() {
|
147 | 150 | Session session = openSession();
|
148 | 151 |
|
@@ -177,10 +180,10 @@ public void testCriteriaNullsFirstLast() {
|
177 | 180 |
|
178 | 181 | @Test
|
179 | 182 | @TestForIssue(jiraKey = "HHH-465")
|
180 |
| - @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class }, |
| 183 | + @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class, SQLServer2008Dialect.class }, |
181 | 184 | comment = "By default H2 places NULL values first, so testing 'NULLS LAST' expression. " +
|
182 |
| - "For MySQL testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
183 |
| - "MySQL does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
| 185 | + "For MySQL and SQL Server 2008 testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
| 186 | + "MySQL and SQL Server 2008 does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
184 | 187 | public void testNullsFirstLastSpawnMultipleColumns() {
|
185 | 188 | Session session = openSession();
|
186 | 189 |
|
@@ -226,10 +229,10 @@ public void testNullsFirstLastSpawnMultipleColumns() {
|
226 | 229 |
|
227 | 230 | @Test
|
228 | 231 | @TestForIssue(jiraKey = "HHH-465")
|
229 |
| - @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class }, |
| 232 | + @RequiresDialect(value = { H2Dialect.class, MySQLDialect.class, SQLServer2008Dialect.class }, |
230 | 233 | comment = "By default H2 places NULL values first, so testing 'NULLS LAST' expression. " +
|
231 |
| - "For MySQL testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
232 |
| - "MySQL does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
| 234 | + "For MySQL and SQL Server 2008 testing overridden Dialect#renderOrderByElement(String, String, String, NullPrecedence) method. " + |
| 235 | + "MySQL and SQL Server 2008 does not support NULLS FIRST / LAST syntax at the moment, so transforming the expression to 'CASE WHEN ...'.") |
233 | 236 | public void testHqlNullsFirstLast() {
|
234 | 237 | Session session = openSession();
|
235 | 238 |
|
|
0 commit comments