Return-Path:
Delivered-To: apmail-openjpa-users-archive@locus.apache.org
Received: (qmail 10079 invoked from network); 12 Dec 2007 01:27:55 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2)
by minotaur.apache.org with SMTP; 12 Dec 2007 01:27:55 -0000
Received: (qmail 26128 invoked by uid 500); 12 Dec 2007 01:27:44 -0000
Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org
Received: (qmail 26114 invoked by uid 500); 12 Dec 2007 01:27:44 -0000
Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: users@openjpa.apache.org
Delivered-To: mailing list users@openjpa.apache.org
Received: (qmail 26105 invoked by uid 99); 12 Dec 2007 01:27:44 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2007 17:27:44 -0800
X-ASF-Spam-Status: No, hits=-1.0 required=10.0
tests=RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: local policy)
Received: from [62.241.163.6] (HELO astro.systems.pipex.net) (62.241.163.6)
by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2007 01:27:20 +0000
Received: from jack.local (85-210-142-71.dsl.pipex.com [85.210.142.71])
by astro.systems.pipex.net (Postfix) with ESMTP id BCE36E000682
for ; Wed, 12 Dec 2007 01:27:20 +0000 (GMT)
Date: Wed, 12 Dec 2007 01:27:20 -0000
To: users@openjpa.apache.org
Subject: Problem using SynchronizeMappings (missing columns)
From: "Daniel Dyer"
Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
MIME-Version: 1.0
Content-Transfer-Encoding: Quoted-Printable
Message-ID:
User-Agent: Opera Mail/9.23 (MacIntel)
X-Virus-Checked: Checked by ClamAV on apache.org
I have an application that was working using Hibernate JPA (standalone, =
=
not in an EJB container).
I have been trying to convert this to use Open JPA instead. The =
application uses only JPA annotations (nothing Hibernate-specific). I =
have managed to fix most of the issues that I have come across but there=
=
is one thing I am stuck on. I am trying to get Open JPA to automaticall=
y =
create the database tables on application start-up (in the same way that=
=
the hibernate.hbm2ddl.auto property works).
To achieve this I am using the SycnhronizeMappings property in the =
persistence.xml. Everything appers to work OK and there are no error =
messages, but when I check the tables in the database (MySQL 5), althoug=
h =
they have been created, most of the columns are missing. The only colum=
ns =
that are present are the primary keys and most, but not all, of the =
foreign keys. Simple value columns (e.g. dates and strings mapped with =
=
@Column) are not there.
This is what my persistence.xml looks like.
org.apache.openjpa.persistence.PersistenceProviderImpl
myproject-core.jar
I have tried numerous variations on "buildSchema" and its parameters tha=
t =
I found on the web, but the result is the same.
Does anybody have any ideas what I'm doing wrong? Am I wrong to assume =
=
that SynchronizeMappings is supposed to be equivalent to =
hibernate.hbm2ddl.auto? I can provide more details if necessary.
Thanks,
Dan.
-- =
Daniel Dyer
http://www.uncommons.org