Grails HQL(位置参数)查询空时间戳 - 奇怪的类型转换错误

时间:2013-07-11 17:36:33

标签: java hibernate grails jdbc hql

Grails域属性: java.sql.Timestamp dateInvoiced

postgresql列: date_invoiced无时区的时间戳

我的查询:

BrokerageOrder.executeQuery(
    "SELECT COUNT(*) AS count FROM BrokerageOrder d WHERE d.dateInvoiced IS ?",[null])

错误:

Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: timestamp  
   without time zone = bytea
   Hint: No operator matches the given name and argument type(s). You might need to add   
   explicit type casts. Position: 133

问题:我该如何解决这个问题?为什么它认为我的null是一个bytea?

谢谢你,杰夫。

0 个答案:

没有答案