我正在尝试使用querydsl为时间戳添加小时。这是我的示例代码:
StringTemplate dbDate = Expressions.stringTemplate("function('DATE_TRUNC', 'day', {0} + cast('5 hours' as interval))", dateTimePath);
但是我收到IllegalArgumentException说:
nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: Could not resolve requested type for CAST : interval