My Oracle Support Banner

How To Avoid Eclipselink Trimming Leading and Trailing Spaces? (Doc ID 1934388.1)

Last updated on SEPTEMBER 18, 2019

Applies to:

Oracle TopLink - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Goal

How to handle a problem when an Entity has a mapped CHAR(2) field, and trailing spaces of it appear to be lost, resulting in non-successful updating/deleting of entities?

This is noticed because Eclipselink's SQL logs at FINE level show update/delete statements with:

  bind => [2014-10-02T18:47:09, 1]

despite it should be:

  bind => [2014-10-02T18:47:09, 1 ]

Closer inspection has shown that it has been the entity's find() method which has returned "1" despite it should have returned "1 " for the CHAR(2) column.
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.