Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] More DDL generation woes

I am working with a 30 (!) year old database and attempting to put a JPA mapping on top of it.  I'm making use of the DDL generation facility in EclipseLink (and the columnDefinition fragment defined by JPA) to see if I can get EclipseLink to come at least close to generating the original schema.  I'm almost there, but....  :-)

As you'll see from looking at bugzilla, there are some issues with DDL generation.

The latest DDL issue I've come across is the behavior with @Embeddable classes.  Hibernate and OpenJPA get this right, or at least don't surprise me.

I have a @MappedSuperclass, called Address.  It defines, among other things, line1 and line2 as columns.  Fine.

Then I have a PrimaryAddress subclass, notated as an @Embeddable.  It inherits from Address, and adds one field: line3.

(All of these fields, whether defined in the @MappedSuperclass Address or its @Embeddable subclass, have columnDefinition fragments on them akin to this: columnDefinition = "CHAR(25)".)

Finally, I have a Party class that embeds a PrimaryAddress.

I would expect at DDL creation time to see the Party entity's table contain the following fields: line1, line2, line3.  Instead it only creates line3 as a column--it ignores the DDL instructions present in the @MappedSuperclass.  Both Hibernate and OpenJPA create the table as I would expect.

I know this is an unspecified swampland in the JPA specification, but is this a bug in EclipseLink?  If so, I'll file (yet another) issue against the DDL machinery.  If someone wants to point me to where all this happens in the code, I'm happy to try to submit a patch.  Gulp!

Thanks,
Laird

Back to the top