openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
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. 

hth
-mike 





--
View this message in context: http://openjpa.208410.n2.nabble.com/Padding-of-CHAR-n-columns-with-trailing-spaces-tp6364510p6428535.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message