File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2045,7 +2045,16 @@ public void testIntervalDiffExpressions(SessionFactoryScope scope) {
2045
2045
.list ();
2046
2046
session .createQuery ("select (e.theTimestamp - (e.theTimestamp + (4 day + 2 hour))) by second from EntityOfBasics e" , Long .class )
2047
2047
.list ();
2048
+ }
2049
+ );
2050
+ }
2048
2051
2052
+ @ Test
2053
+ @ SkipForDialect (dialectClass = PostgresPlusDialect .class ,
2054
+ reason = "PT47H59M59.999999S instead of PT48H" )
2055
+ public void testIntervalDiffExpressionsWithAssertions (SessionFactoryScope scope ) {
2056
+ scope .inTransaction (
2057
+ session -> {
2049
2058
assertThat ( session .createQuery ("select (local datetime + 2 day) - local datetime" ).getSingleResult (),
2050
2059
is ( Duration .ofDays ( 2 ) ) );
2051
2060
assertThat ( session .createQuery ("select (local datetime - 12 hour) - local datetime" ).getSingleResult (),
You can’t perform that action at this time.
0 commit comments