Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink 2.4.1 - problem with indexes on n:m relations with join tables

Hi everyone,

On 2013-08-22 16:54, Phil wrote:
ABSTRACT
I'm using EclipseLink 2.4.1 with many different databases (some of
them with case-sensitive column names :-().
Some of these databases automatically add indexes on foreign key
columns while others do not.

Therefore I wanted to add indexes manually with the help of
@Index(es) annotations,
but do not get any indexes if N:M relations with Join Tables are used.

What's the right way to declare indexes on join tables since it seems
to be a matter of when each table is generated in the database?
The join table is not existing while the relation tables are
processed and thus no index can be created.

In order to clarify the problem I filed a bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415749
with a little mvn-example project that shows the behaviour and provides means for improvements.

The problem is that explicitly added @Index annotations do not seem to work on ManyToMany relations.

In case of questions feel free to drop me a line -
thanks

Phil


Back to the top