persistence@glassfish.java.net

Re: Fix to TableDefinition

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Wed, 21 May 2008 14:07:02 -0700

(Just noticed this). If you would you his patch, he needs to sign SCA for TLE
and whatever needed for EL.

-marina

Mitesh Meswani wrote:
> Hi Flavio,
>
> Can you please file a bug under "entity-persistence" category and attach
> the patch to it. This will help others running into similar issue. That
> said, the checkins into toplink-essentials are limited to critical fixes
> only. All active development on persistence for GlassFish is now
> happening under EclipseLink <http://www.eclipse.org/eclipselink/>
> project. GlassFish V3 ships with EclipseLink as the JPA provider. You
> can also start using EclipseLink with GlassFish V2.1 starting with build
> 32 of V2.1. All you need to do is to drop EclipseLink jars in lib dir of
> GlassFish. Can you please check whether the issue is present with
> EclipseLink.
>
> Thanks,
> Mitesh
>
> Flavio Stutz wrote:
>
>> Guys,
>>
>> I made a patch to Toplink in order to fix a problem I had.
>> Other guys are facing the same problem:
>> http://forums.java.net/jive/thread.jspa?messageID=273811&#273811
>> <http://forums.java.net/jive/thread.jspa?messageID=273811&#273811>
>>
>>
>> The altered class is
>> oracle.toplink.essentials.tools.schemaframework.TableDefinition
>>
>> Instead of
>> "foreignKeyName = Helper.truncate(shortenedTableName,
>> maximumNameLength - shortenedFieldName.length()) +
>> shortenedFieldName;" (line 460)
>>
>> Use
>> "foreignKeyName = Helper.truncate(shortenedTableName,
>> Math.max(maximumNameLength - shortenedFieldName.length(),0)) +
>> Helper.truncate(shortenedFieldName, maximumNameLength);" (line 460)
>>
>> When shortedFieldName size is greater than maximumNameLength, it is
>> passed a negative value to Helper.truncate(..)
>>
>> I hope this could be commited to repository.
>>
>> Flávio Stutz
>