Unable to use Hibernate queries using datatype CHAR(5)

Solution Unverified - Updated -

Issue

We have a table with a column xy that has the datatype CHAR(5). When executing a sql query like e.g.

SELECT xy FROM abc WHERE...

A java.lang.Character is returned. This leads to returning just the first character of the value.

Environment

JBoss Enterprise Application Platform all versions

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