persistence@glassfish.java.net

Re: Altering tables

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 07 Apr 2008 16:36:28 -0700

Hi Kiril,

There is no JPA-defined way to do it.

TopLink Essentials can only drop and create tables, while OpenJPA by default
only adds/removes columns if the table already exist. Either way you request
this feature in a provider-specific way or through the tools.

Regards,
-marina

Kiril Minanov wrote:
> Hi
>
> I was wondering if you can tell me how to alter a table
> add/remove columns using JPA, not native queries
>
> Without recreating the tables
>
> Thank you