You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "roger.keays" <ro...@ninthavenue.com.au> on 2006/11/17 08:29:33 UTC

Some portability testing results

I've just finished testing the portability of an openjpa app, and thought you
all might be interested in the results. Basically, of the 9 databases I
tested the only one which I couldn't get to work was hypersonic.

The db's tested were:
  Derby 10.1,
  Postgres 8.1,
  Postgres 7.4,
  Mysql 5.0,
  Mysql 4.1,
  Hypersonic 1.8,
  h2 1.0,
  SQL Server 2005,
  Oracle 10.2

Here were the problems I came across. Most of them are very minor.

Postgres and SQL Server:
  * Foreign key indexes must be created by hand (not created by database).

Hypersonic:
  * Long character fields changed from VARCHAR(255) to LONGVARCHAR manually.
  * Column type mismatches for some foreign keys. Caused by Long id fields
being mapped to INTEGER instead of BIGINT. Fixed by hand.
  * PK clashes with existing items in the database. The id generator is not
working correctly. This is the blocker, and using an openjpa generated key
doesn't resolve the issue.:

<2|false|0.9.6-incubating>
org.apache.openjpa.persistence.EntityExistsException: 
An object of type "figbird.cms.entities.Page" with oid 
"figbird.cms.entities.Content-0" already exists in this context; 
another cannot be persisted.
FailedObject: figbird.cms.entities.Page@1f08ed8
  at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2359)
  at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2195)
  at
org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:991)
  at
org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:486)
  at figbird.cms.entities.TestCreate.createPage1(TestCreate.java:74)

H2:
  * Long character fields changed from VARCHAR(255) to CLOB manually (we're
using the hsql DBDictionary).

Oracle:
  * No support for autoincrement columns.
  * 'Trigger' method of faking autoincrement fails with openjpa.
  * Many reserved word clashes (size, type, level, comment).
  * FK errors on insert (disabled fks).

Misc:
  * The mapping tool didn't create any indexes for my @Index annotated
field.

That's it. Not too bad really. Strange that H2 passed all my tests using the
hsql dictionary, but hsql itself didn't.

Roger
-- 
View this message in context: http://www.nabble.com/Some-portability-testing-results-tf2649965.html#a7395022
Sent from the open-jpa-dev mailing list archive at Nabble.com.


Re: Some portability testing results

Posted by Bryan Noll <bw...@gmail.com>.
Thanks for posting this Roger... it's very valuable information to have 
out there.

--Bryan

roger.keays wrote:
> I've just finished testing the portability of an openjpa app, and thought you
> all might be interested in the results. Basically, of the 9 databases I
> tested the only one which I couldn't get to work was hypersonic.
>
> The db's tested were:
>   Derby 10.1,
>   Postgres 8.1,
>   Postgres 7.4,
>   Mysql 5.0,
>   Mysql 4.1,
>   Hypersonic 1.8,
>   h2 1.0,
>   SQL Server 2005,
>   Oracle 10.2
>
> Here were the problems I came across. Most of them are very minor.
>
> Postgres and SQL Server:
>   * Foreign key indexes must be created by hand (not created by database).
>
> Hypersonic:
>   * Long character fields changed from VARCHAR(255) to LONGVARCHAR manually.
>   * Column type mismatches for some foreign keys. Caused by Long id fields
> being mapped to INTEGER instead of BIGINT. Fixed by hand.
>   * PK clashes with existing items in the database. The id generator is not
> working correctly. This is the blocker, and using an openjpa generated key
> doesn't resolve the issue.:
>
> <2|false|0.9.6-incubating>
> org.apache.openjpa.persistence.EntityExistsException: 
> An object of type "figbird.cms.entities.Page" with oid 
> "figbird.cms.entities.Content-0" already exists in this context; 
> another cannot be persisted.
> FailedObject: figbird.cms.entities.Page@1f08ed8
>   at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2359)
>   at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2195)
>   at
> org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:991)
>   at
> org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:486)
>   at figbird.cms.entities.TestCreate.createPage1(TestCreate.java:74)
>
> H2:
>   * Long character fields changed from VARCHAR(255) to CLOB manually (we're
> using the hsql DBDictionary).
>
> Oracle:
>   * No support for autoincrement columns.
>   * 'Trigger' method of faking autoincrement fails with openjpa.
>   * Many reserved word clashes (size, type, level, comment).
>   * FK errors on insert (disabled fks).
>
> Misc:
>   * The mapping tool didn't create any indexes for my @Index annotated
> field.
>
> That's it. Not too bad really. Strange that H2 passed all my tests using the
> hsql dictionary, but hsql itself didn't.
>
> Roger
>