Hi David, What Martin suggested is right. Just add that *property* element to your persistence-unit in your persistence.xml.
<properties> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction=add,deleteTableContents,ForeignKeys=true)" /> </properties> No, the properties don't have to appear is a specific order. It's not easy to help you when all we have is "it doesn't seem to work". What version of openJPA are you running, is there a stacktrace, a sample of your persistence.xml, anything at all. Perhaps it is an integration issue. I don't know where the documentation is either but I just googled 'openjpa persistence.xml' & got a complete example of OpenJPA with H2 configuration here [1] Does anyone on else know the possible values [chapter 2 (Configuration) of the manual on the website had the properties but doesn't have their possible/legal values] [1] http://www.jpox.org/servlet/forum/viewthread?thread=4188 regards, Judes On Thu, Feb 12, 2009 at 2:20 PM, David Beer <[email protected]>wrote: > Hi All > > Can anyone help with this. Is it possible this just doesn't work with the > h2 > database or should my persistence.xml file be in a specific order. As in > have the values and properties got to be in a specific order? Is it worth > upgrading to a newer version of openjpa, would this solve my issue? > > David > > 2009/2/10 David Beer <[email protected]> > > > Hi Martin > > > > Thanks for your suggestion, I have tried entering the value but it > doesn't > > seem to work. Where did you find the documentation values for > > jdbc.SynchroniseMappings > > > > David > > > > 2009/2/9 Martin Uhlir <[email protected]> > > > >> Hi, > >> > >> put this property into properties list in the persistence.xml > >> > >> <property name="openjpa.jdbc.SynchronizeMappings" > >> value="buildSchema(SchemaAction='add')"/> > >> > >> Martin > >> > >> > >> > >> David Beer wrote: > >> > >>> Hi All > >>> > >>> I have successsfully set the Schema in the persistence.xml file. My > >>> question > >>> is how do I get the schma auto generated when the table are generated. > I > >>> am > >>> using the h2 database. > >>> > >>> Any guidence would helpful. > >>> > >>> Thanks > >>> > >>> David > >>> > >>> > >>> > >> > >> > > >
