Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » What happened in "Query"
What happened in "Query" [message #1027615] Wed, 27 March 2013 07:23 Go to next message
Johnny Yeung is currently offline Johnny Yeung
Messages: 2
Registered: March 2013
Junior Member
Version: eclipselink-2.3.1
Data-base: oracle
Data-base Table A: included a column A1(Type is Char)

I used TypedQuery.getResultList() to query Table A. The result value which corresponding to column A1 lost the right SPACE. However, the right SPACE was not lost when I use Oracle JDBC to query. Anyone met the same problem?
Re: What happened in "Query" [message #1032030 is a reply to message #1027615] Tue, 02 April 2013 13:41 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

CHAR field spaces are trimmed by default. To disable this set,

session.getLogin().setShouldTrimStrings(false);

Using a SessionCustomizer.


James : Wiki : Book : Blog : Twitter
Re: What happened in "Query" [message #1034158 is a reply to message #1032030] Fri, 05 April 2013 04:40 Go to previous message
Johnny Yeung is currently offline Johnny Yeung
Messages: 2
Registered: March 2013
Junior Member
I got it. Thank you very much!
Previous Topic:Unable to read a db table
Next Topic:Eclipselink Query show's different data than resultset
Goto Forum:
  


Current Time: Thu Oct 23 22:04:07 GMT 2014

Powered by FUDForum. Page generated in 0.04574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software