DB2Dialect override for substring hides DB2 method in Hibernate

Solution Verified - Updated -

Issue

  • Creating an HQL query (e.g. from Employee e where e.name = (SUBSTRING('Johnny', 1, 4, OCTETS)))
  • The DB2 driver raises com.ibm.db2.jcc.am.SqlSyntaxErrorException: ... SQLCODE=-104, SQLSTATE=42601, SQLERRMC=OCTETS ... during query execution.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
    • 6
  • Hibernate
    • 5
    • 4
  • DB2
    • 10.5
    • 10.1
    • 9.7

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