Hi,
You can do something similar like so in OpenJPA:
<property name="openjpa.SynchronizeMappings" value="buildSchema"/>
Personally, for unit testing, I prefer the following:
<property name="openjpa.SynchronizeMappings"
value="buildSchema(SchemaAction=add,deleteTableContents)"/>
That will update the schema with any new elements, and will issue
unqualified delete statements against all the tables that OpenJPA
knows about. For tables with a small number of records in them, this
is usually the fastest way to get a clean schema.
-Patrick
On 8/29/07, Keqiang Feng <[EMAIL PROTECTED]> wrote:
> When I use toplink,I put "<property name="toplink.ddl-generation"
> value="create-tables"/>" into persistence.xml.Then i don't need create table
> in database by my hand.I just write a java bean and r/w it from
> database.Ifit's not existed of the table,toplink will create it.
>
> I can't find it in openjpa.If you have this function,please tell me.I think
> it's very useful function.
>
> Thank you!
>
--
Patrick Linskey
202 669 5907