Hi Kevin Thanks for the information, I have added the following value to my persistence.xml file:
<property name="openjpa.jdbc.DBDictionary" value="hsql(useSchemaName=true)"/> This will generate tables in the specified schema as expected. I still think that this option should be true by default. If this is more dependant on the databse than the DBDictionary then it could be more of a problem. Is there a way of getting this added to the documentation? -- Thanks David On Thu, 2009-10-29 at 10:35 -0500, Kevin Sutter wrote: > I did a quick comparison of the two dictionaries and found this > reference in the HSQLDB dictionary... > > // HSQL 1.8.0 does support schema names in the table > ("schema.table"), > // but doesn't support it for columns references > ("schema.table.column") > useSchemaName = false; > > In the H2 (and most other database) dictionaries, this configuration > property is set to "true". I am not an HSQLDB user, so I don't know > if this limitation was resolved with a later version of 1.8.x or if it > is resolved with the latest 1.9 release. But, it would be rather > straight forward to try it out by setting this property to "true" in > your environment and give it a run. > > You don't have to modify and re-build the OpenJPA code base. You can > easily do this via a property setting in your persistence.xml file... > > <property name="openjpa.jdbc.DBDictionary" value="useSchemaName=true"/> > > > Let us know how it goes. > Kevin > > On Wed, Oct 28, 2009 at 10:07 AM, David Beer > <david.m.b...@googlemail.com> wrote: > Hi Kevin > > This looks like the problem I am experiencing. I will add a > comment and > example project of how I set the value for the schema. > > If I get a chance to look at the code I will. I would have > though that > the H2 DBDictionary could be very similar to the HSQL > DBDictionary. > > Thanks > > David > > > On Wed, 2009-10-28 at 09:42 -0500, Kevin Sutter wrote: > > Sorry for the delay with responding, David. Now that I > fully > > understand your situation, it rang a bell with me and I > found the > > following JIRA that seems to describe your exact situation. > > > > https://issues.apache.org/jira/browse/OPENJPA-483 > > > > Since this seems to be related to the HSQLDB only, then it > is more > > than likely due to the DBDictionary for HSQLDB. I don't > have cycles > > to drive this problem, but if you are interested in helping > to > > contribute, you would be more than welcome. :-) The > DBDictionary > > support is rather straight forward. Each database can have > a > > dictionary to help define what functions are available. The > OpenJPA > > runtime depends on the dictionary to determine whether > various > > functions and features are available. It sounds like the > HSQLDB > > dictionary is not processing the schema correctly. > > > > Let us know your plans with this issue. Thanks. > > Kevin > > > > On Sat, Oct 24, 2009 at 6:59 AM, David Beer > > <david.m.b...@googlemail.com> wrote: > > Hi All > > > > I have just noticed that my last e-mail contained > some typos > > which > > provided to give the wrong information. > > > > What I am trying to say is that openjpa seems to > ignore the > > specified > > schem when openjpa.jdbc.Schema property in my > persistence.xml > > file. This > > works fine with the H2 database but not the HSQLDB > database. > > > > It would be nice to know if there is a way of > getting openjpa > > to use the > > Schema set in HSQLDB. > > > > Thanks > > > > David > > > > > > On Thu, 2009-10-22 at 20:08 +0100, David Beer wrote: > > > Hi Kevin > > > > > > I use the property openjpa.jdbc.Schema set in my > > persistence.xml file. > > > It would appear that the schema name is being > recognised > > properly. I am > > > using openjpa 1.2.1. It seems similar to this Jira > issue > > > https://issues.apache.org/jira/browse/OPENJPA-842. > I am not > > sure though, > > > it would be good to be able to use a separate > schema. > > > > > > Thanks > > > > > > David > > > > > > On Thu, 2009-10-22 at 08:27 -0500, Kevin Sutter > wrote: > > > > Hi David, > > > > There are several JPA-defined mechanisms to > override a > > schema name. > > > > You can specify a schema name on the @Table or > > @SecondaryTable > > > > annotation. You can specify a default schema > name in an > > orm.xml file. > > > > Or, you can use the OpenJPA-specific property > > openjpa.jdbc.Schema [1] > > > > in your persistence.xml. > > > > > > > > Are you indicating that these approaches are not > > sufficient for your > > > > scenario? Or, are these not working with > HSQLDB? > > > > > > > > Hope this helps, > > > > Kevin > > > > > > > > [1] > > > > > > > > http://openjpa.apache.org/builds/latest/docs/manual/manual.html#openjpa.jdbc.Schema > > > > > > > > On Thu, Oct 22, 2009 at 6:23 AM, David Beer > > > > <david.m.b...@googlemail.com> wrote: > > > > Hi All > > > > > > > > Is there anyway to get openjpa and > HSQLDB to use a > > different > > > > schema to > > > > the default one. > > > > > > > > > > > > -- > > > > Thanks > > > > > > > > David > > > > > > > > > > > > > > > > > > > >