persistence@glassfish.java.net

Re: [Code Review]Updating GlassFish to use PFD version of persistence spi

From: Craig L Russell <Craig.Russell_at_Sun.COM>
Date: Tue, 31 Jan 2006 13:08:28 -0800

Hi,

On Jan 31, 2006, at 9:50 AM, Mitesh Meswani wrote:

> Sahoo,
>
>>
>> Internal Exception: org.apache.derby.client.am.SqlException:
>> 'TRIM' is not recognized as a function or procedure.Error Code: -1
>> Call:SELECT ID, ITEM_VERSION, DESCRIPTION, NAME FROM CMP3_ITEM
>> WHERE (TRIM(NAME) = 'tem')
> Trim is not supported on Derby. This is a known issue. I think we
> will need to find out a mechanism to exclude such tests on Derby.

There is nothing in the spec about support for TRIM being optional,
except for the specification of a trim character other than blank. So
excluding the test is not an option.

Apparently Derby supports LTRIM and RTRIM, so the generated SQL might
include LTRIM(RTRIM(NAME)) = 'tem'.

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell_at_sun.com
P.S. A good JDO? O, Gasp!