Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Generate index for foreign keys in oracle (How to enable automatic generation of indices for foreign key fields using Oracle database)
Generate index for foreign keys in oracle [message #820806] Wed, 14 March 2012 11:35 Go to previous message
Ga'bor Pe'ntek is currently offline Ga'bor Pe'ntek
Messages: 16
Registered: July 2009
Junior Member
Hi All,

in our application we found that indexing foreign key fields in the database result in highly increased performance. Therefor I tried to find some eclipselink or JPA setting that enables the automatic generation of indices for foreign key columns.

Unfortunately I found nothing about the topic so I started reading the eclipselink code.

While searching for the proper setting, I found that overriding the
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
in my case
Oracle10DatabasePlatform
is quite easy. My class should be added to persistence.xml in the databasePlatform property.

However I found no documentation on overriding the
org.eclipse.persistence.tools.schemaframework.TableDefinition
class which handles table creation. I would like to add the foreign key creation code to the
createOnDatabase
method just like the
createIndexOnPrimaryKeyOnDatabase()
and
createIndicesOnUniqueKeysOnDatabase()
methods.

How can I override TableDefinition with my custom class?

Thanks in advance!
Gábor
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:serialUID mismatch on remote EJB call
Next Topic:Unable to create query.
Goto Forum:
  


Current Time: Thu May 23 08:02:47 EDT 2013

Powered by FUDForum. Page generated in 0.01846 seconds