Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] DDL Generation for

So I'm just wondering about DDL generation in EclipseLink.  

I'm using a simple Entity with List of String as a child table.  Based on what I've read, this is generally defined by an ERD as

PK, FK1 ENTITY_ID
PK         STRING_VALUE

This is the exact mapping I've defined

 @ElementCollection
 @CollectionTable(name="INSTANCE_JOB_CODE_ACCESS",joinColumns=@JoinColumn(name="SCORECARD_INSTANCE_ID"),schema="SCORECARD")
 @Column(name="JOB_CODE")
    private List<String> instanceJobCodesAccess = Lists.newArrayList();

Now, I can make it a unique constraint in the CollectionTable, however, I'm wondering if there's someway I can force it to generate the foreign key constraint as well as the primary key, as this does not get generated.

Thanks!

John



Back to the top