Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Indexing the FK of a table generated for an element collection ?

Hi Philip,

Does this not work?

@ElementCollection
@OrderColumn
@Index(columnNames={FK_NAME})
private List<String> details.

Cheers,
Guy

On 06/02/2013 8:22 PM, Phillip Ross wrote:
Hi all,

I have a quick question regarding DDL generation of indexes for element collections.

I have a class in which exists a property which is a list of strings, and is annotated with element collection.  The declaration is simply as follows:

@ElementCollection
@OrderColumn
private List<String> details;

When the DDL is generated, a details table is created with a FK pointing back to the table corresponding to the class containing the list property.  There's not a separate class for the elements of the embedded collection for me to annotate with @Indexes/@Index annotation... since the type is String.  Is there a way to annotate something else to have DDL generation create the index on the FK of the embedded collection table or will I have to do this manually?

Thanks!
- Phillip


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

--

Oracle
Guy Pelletier

ORACLE Canada, 45 O'Connor Street Suite 400 Ottawa, Ontario Canada K1P 1A4

Green
            Oracle Oracle is committed to developing practices and products that help protect the environment


Back to the top