Talk:Java Persistence/ElementCollection

In Fact, the annotated code on the eclipselink implementation did not generate FKs btw the entity table and the collection table. I wonder why it happens. By the way, no PK is generated either, what can be a headache if you intend to design the database from the ORM mappings....


 * Foreign key constraints should be generated, although the JPA does not require this (or schema creation in general). Sounds like a bug in EclipseLink's schema creation.  Please log a bug on EclipseLink for this.  As for the primary keys, JPA does not define an Id for Embeddables, so defining a primary key would be difficult.  EclipseLink does allow defining a primary key on Embeddables used in an ElementCollection, so this may work.
 * James (talk) 12:48, 31 May 2010 (UTC)


 * I don't see any option to ask or question the article, so doing it here. Basic Collections doesn't tell about how deletion works. Missing the core issue Krisferrari (discuss • contribs) 16:59, 10 April 2021 (UTC)