You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Anton Bakanovsky <An...@gemini-systems.ru> on 2012/04/12 11:05:08 UTC

Auto DB schema creation

Hi!

When I use internal or external DB for ODE (Orcacle fo example)  there is 
necessity to create DB schema.
When ODE configured to use Hibernate it is easy to add 
hibernate.hbm2ddl.auto=update property. However, if we use OpenJPA, I see 
no way to auto create  schema.
So I suppose, it may be a good idea to add auto schema creation properties 
into persistens.xml

        <properties>
                <property name="openjpa.jdbc.SchemaFactory" 
value="native(ForeignKeys=true)"/>
                <property name="openjpa.jdbc.SynchronizeMappings" 
value="buildSchema(ForeignKeys=true)"/>
        </properties>


Next one problem about installing on SMX 4.4.1...
ODE bundle requires package org.osgi.service.command, that isn't provided 
by base SMX build. I've found this package is contaned by 
org.apache.felix.gogo/org.apache.felix.gogo.runtime/0.4.0 bundle.  It will 
likely  be useful to add this (or any same) dependency into 
features.xml...
 

Best regards.

Re: Auto DB schema creation

Posted by Tammo van Lessen <tv...@gmail.com>.
Hi Anton,

The ODE schemas are usually packaged with the distribution you can
download from our website. However, you may have a look at
http://ode.apache.org/ode-schema.html, this page contains optimized
schemas (i.e. with optimized indices). The DB schema did not change
between ODE 1.3.4 and 1.3.5, so they should be working fine.

Regarding the SMX dependencies, thats unfortunately a known issue. A
service release to fix this is overdue but unfortunately I cannot find
the time right now to properly test it.

Best,
  Tammo

On Thu, Apr 12, 2012 at 11:05, Anton Bakanovsky
<An...@gemini-systems.ru> wrote:
> Hi!
>
> When I use internal or external DB for ODE (Orcacle fo example)  there is
> necessity to create DB schema.
> When ODE configured to use Hibernate it is easy to add
> hibernate.hbm2ddl.auto=update property. However, if we use OpenJPA, I see
> no way to auto create  schema.
> So I suppose, it may be a good idea to add auto schema creation properties
> into persistens.xml
>
>        <properties>
>                <property name="openjpa.jdbc.SchemaFactory"
> value="native(ForeignKeys=true)"/>
>                <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)"/>
>        </properties>
>
>
> Next one problem about installing on SMX 4.4.1...
> ODE bundle requires package org.osgi.service.command, that isn't provided
> by base SMX build. I've found this package is contaned by
> org.apache.felix.gogo/org.apache.felix.gogo.runtime/0.4.0 bundle.  It will
> likely  be useful to add this (or any same) dependency into
> features.xml...
>
>
> Best regards.



-- 
Tammo van Lessen - http://www.taval.de