openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Re: Padding of CHAR(n) columns with trailing spaces
Date Wed, 01 Jun 2011 19:53:37 GMT
In general the contents of the entity should match what we get back from the
JDBC driver. I don't think OpenJPA intentionally pads or trims the contents
of a String (although you're seeing otherwise). 

That said, DB2 does not differentiate between 'abc' and 'abc   '. So
something like this will work :
INSERT INTO s (name) VALUES ('abc   ') 
SELECT * FROM s WHERE name = 'abc'  // returns the row you just inserted. 


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message