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
in my case is quite easy. My class should be added to persistence.xml in the databasePlatform property.
However I found no documentation on overriding the
class which handles table creation. I would like to add the foreign key creation code to the method just like the
How can I override TableDefinition with my custom class?
Thanks in advance!