Skip to main content

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

I'm not sure about the production readiness definition - personally, I wouldn't use create or update types of DDL generation on the fly for production installs, but at least the bulk of the work is done.

I will file the mentioned bug, reference this email.  Thanks.

On Tue, Jan 12, 2010 at 10:20 AM, James Sutherland <jamesssss@xxxxxxxxx> wrote:

The foreign key constraint should be defined, please log a bug for this.

The primary key constraint cannot be defined, as there is some level of
support for duplicates in an ElementCollection.  But, if you have defined a
unique constraint, or use a Set, then it should probably get defined,
include this in the bug.

For now you can just create or alter the table with your own DDL.  The auto
generated tables are mainly for prototyping, so do not support everything
that you may wish to define in a production schema.



meetoblivion wrote:
>
> 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
>


View this message in context: http://old.nabble.com/DDL-Generation-for-tp27070052p27129166.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

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


Back to the top