add tests for casts to/from OffsetDateTime
This commit is contained in:
parent
3dc196c673
commit
696bbf3ff8
|
@ -15,6 +15,7 @@ import org.hibernate.dialect.MariaDBDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.OracleDialect;
|
import org.hibernate.dialect.OracleDialect;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
import org.hibernate.dialect.PostgreSQLDialect;
|
||||||
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.TiDBDialect;
|
import org.hibernate.dialect.TiDBDialect;
|
||||||
import org.hibernate.testing.TestForIssue;
|
import org.hibernate.testing.TestForIssue;
|
||||||
import org.hibernate.testing.orm.domain.StandardDomainModel;
|
import org.hibernate.testing.orm.domain.StandardDomainModel;
|
||||||
|
@ -867,6 +868,19 @@ public class FunctionTests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@SkipForDialect(dialectClass = DB2Dialect.class, matchSubTypes = true)
|
||||||
|
@SkipForDialect(dialectClass = DerbyDialect.class)
|
||||||
|
@SkipForDialect(dialectClass = SybaseDialect.class, matchSubTypes = true)
|
||||||
|
public void testCastToOffsetDatetime(SessionFactoryScope scope) {
|
||||||
|
scope.inTransaction( session -> {
|
||||||
|
session.createQuery("select cast(datetime 1911-10-09 12:13:14-02:00 as String)", String.class).getSingleResult();
|
||||||
|
session.createQuery("select cast('1911-10-09 12:13:14.123-02:00' as OffsetDateTime)", OffsetDateTime.class)
|
||||||
|
.getSingleResult();
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCastDoubleToString(SessionFactoryScope scope) {
|
public void testCastDoubleToString(SessionFactoryScope scope) {
|
||||||
scope.inTransaction(
|
scope.inTransaction(
|
||||||
|
|
Loading…
Reference in New Issue