You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by joe <fi...@yahoo.de> on 2010/06/28 16:28:21 UTC
MaxDB and OpenJPA
Hi,
For unit tests i like to set the following property in the
persistence.xml file:
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(SchemaAction='dropDB,add')" />
</properties>
This works for Derby and Oracle but it doesn't work for MaxDB.
I looked at:
http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_dbsetup_dbsupport.html
So it looks like schema generation is not supported for MaxDB.
Is it planned for JPA, especially for a 1.2.x?
RE: MaxDB and OpenJPA
Posted by C N Davies <cn...@cndavies.com>.
Oh Ok ... hmm I haven't used dropping because I like to keep the old
data/schema even I am not using it.
I just checked the manual regarding the mapping tool (this property uses)
and I think you need to change your action stuff. Check Pg 262 of the 1.2.x
manual (pdf version) . It looks like I does support what you want but not
with your setup.
Hth
Chris
-----Original Message-----
From: joe [mailto:fischauto333@yahoo.de]
Sent: Tuesday, 29 June 2010 1:14 AM
To: users@openjpa.apache.org
Subject: Re: MaxDB and OpenJPA
Hi,
> Joe I am not sure exactly what your question is, is it the
> "SchemaAction" or is it more generally the SynchronizeMappings property?
Hm, i think the SchemaAction.
If i understand it correctly it leads to a dropping of all tables, and after
it to a recreation of the tables based on the entities.
At least this is what i want to accomplish for the unit tests.
For MaxDB the dropping of the tables works, but the tables are not
recreated.
> Anyway, I use MaxDB
> with this setting on 1.2.2 and 2.0 perfectly fine.
>
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
I suppose you created the tables in MaxDB through native SQL by yourself and
not from OpenJPA.
For production i do the same and OpenJPA seems to work together with MaxDB.
Re: MaxDB and OpenJPA
Posted by joe <fi...@yahoo.de>.
Hi,
> Joe I am not sure exactly what your question is, is it the "SchemaAction" or
> is it more generally the SynchronizeMappings property?
Hm, i think the SchemaAction.
If i understand it correctly it leads to a dropping of all tables, and
after it to a recreation of the tables based on the entities.
At least this is what i want to accomplish for the unit tests.
For MaxDB the dropping of the tables works, but the tables are not
recreated.
> Anyway, I use MaxDB
> with this setting on 1.2.2 and 2.0 perfectly fine.
>
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
I suppose you created the tables in MaxDB through native SQL by yourself
and not from OpenJPA.
For production i do the same and OpenJPA seems to work together with MaxDB.
RE: MaxDB and OpenJPA
Posted by C N Davies <cn...@cndavies.com>.
Joe I am not sure exactly what your question is, is it the "SchemaAction" or
is it more generally the SynchronizeMappings property? Anyway, I use MaxDB
with this setting on 1.2.2 and 2.0 perfectly fine.
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
Always use build time enhancement or buy a lotto ticket instead!
Chris
-----Original Message-----
From: joe [mailto:fischauto333@yahoo.de]
Sent: Tuesday, 29 June 2010 12:28 AM
To: users@openjpa.apache.org
Subject: MaxDB and OpenJPA
Hi,
For unit tests i like to set the following property in the persistence.xml
file:
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(SchemaAction='dropDB,add')" /> </properties>
This works for Derby and Oracle but it doesn't work for MaxDB.
I looked at:
http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_
guide_dbsetup_dbsupport.html
So it looks like schema generation is not supported for MaxDB.
Is it planned for JPA, especially for a 1.2.x?