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