This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes DB2 CHARACTER datatype issue in JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "DB2 CHARACTER datatype issue in JPA" Watch "DB2 CHARACTER datatype issue in JPA" New topic
Author

DB2 CHARACTER datatype issue in JPA

anyz mick
Greenhorn

Joined: Aug 09, 2004
Posts: 15
I am working with DB2 Universal database having lots of tables with columns of datatype CHARACTER. Length of these columns is variable (greater than 1 e.g. 18). As i execute a Native query using JPA it selects only first character of the column. Seems CHARACTER datatype is mapped to Java Character.

How can i get full contents in DB column. I can not change the database bening on Vendor side. Also there are two sides of problem:

- When using JPQL
- Using native DB query (no pojo is used in this case)

i am using Hibernate implementation of JPA provided by spring.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DB2 CHARACTER datatype issue in JPA
 
Similar Threads
invalid colum name GenericJDBCException: could not execute query
JPA native query problem
JPA and "persistence Provider"
Middlegen Hibernate issue
Model to add to a database