openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: How do we know the entity is successfully deployed on appserver
Date Fri, 11 May 2007 13:56:40 GMT
Joshua,
Most definitely you can ask user questions on this list.  Thanks for
posting.

OpenJPA provides the ability to autogenerate the database tables at runtime
via the SynchronizeMappings property in the persistence.xml.  Here's an
example usage:

    <persistence-unit name="inheritance">
        <class>my.persistence.tests.inheritance.RootEntity</class>
        <class>my.persistence.tests.inheritance.LeafEntity</class>
        <class>my.persistence.tests.inheritance.AbstractEntity</class>
        <properties>
            <property name="openjpa.ConnectionDriverName"
                value="org.apache.commons.dbcp.BasicDataSource"/>
            <property name="openjpa.ConnectionProperties"
               value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver
,Url=jdbc:derby:target/temp/play/play.test;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true"/>
            <property name="openjpa.jdbc.SynchronizeMappings"
                value="buildSchema(ForeignKeys=true)"/>
            <property name="openjpa.Log" value="DefaultLevel=INFO"/>
        </properties>
    </persistence-unit>


On 5/11/07, Joshua Jackson <joshua.java@gmail.com> wrote:
>
> Dear all,
>
> How do I know whether an entity is successfully deployed on an
> appserver? Usually I detect this by autogenerating tables in database.
> Is there anyway I can autogenerate tables in database with OpenJPA?
> I've searched in documentation but perhaps I have missed it when
> reading it.
>
> Last but not least, am I allowed to ask user questions in this list?
> Since this is a dev list.
>
> Thanks in advance
>
> --
> YM!: thejavafreak
> Blog: http://www.nagasakti.or.id/roller/joshua/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message