persistence@glassfish.java.net

Re: Fix to TableDefinition

From: Flavio Stutz <flaviostutz_at_gmail.com>
Date: Wed, 21 May 2008 19:18:40 -0300

But it's a ONE LINE fix!

On Wed, May 21, 2008 at 6:29 PM, Marina Vatkina <Marina.Vatkina_at_sun.com>
wrote:

> Right. But you need to sign the appropriate documents so that your code can
> be used.
>
> thanks,
> -marina
>
> Flavio Stutz wrote:
>
>> I just want to send the code to someone that could commit this to svn!
>> It's VERY simple.
>>
>> Thanks.
>>
>> Stutz
>>
>> On Wed, May 21, 2008 at 6:07 PM, Marina Vatkina <Marina.Vatkina_at_sun.com<mailto:
>> Marina.Vatkina_at_sun.com>> wrote:
>>
>> (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>
>> <
>> 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
>>
>>
>>
>>
>>
>