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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content