Incorrect "to_char" function in HSQL Dialect in Hibernate 4

Solution Verified - Updated -

Issue

We're comparing a "to_char" construct that gets a Calendar as parameter to a String. The "to_char" converts the Calendar to a String, making it possible to compare it with a String. For me it looks like Hibernate
doesn't get that "to_char" makes that conversion and only sees that there's a Calendar (within the "to_char") on the left hand side and a String parameter on the right hand side and decides (erroneously) that a comparison between the two is invalid.

Environment

  • JBoss Enterprise Application Platform (EAP) 6.0
  • Hibernate 4.{0,1}

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.