users@glassfish.java.net

Re: When using _at_PersistenceContext deploying returns a string index out of

From: <glassfish_at_javadesktop.org>
Date: Mon, 12 May 2008 08:04:14 PDT

Guys,
I made a patch to Toplink in order to fix this problem.

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)

I hope this could be commited to repository.

Flávio Stutz
[Message sent by forum member 'flaviostutz' (flaviostutz)]

http://forums.java.net/jive/thread.jspa?messageID=273811