Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 13807 invoked from network); 12 Dec 2007 01:41:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2007 01:41:09 -0000 Received: (qmail 32427 invoked by uid 500); 12 Dec 2007 01:40:58 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 32407 invoked by uid 500); 12 Dec 2007 01:40:58 -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 32396 invoked by uid 99); 12 Dec 2007 01:40:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2007 17:40:58 -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 (nike.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:40:57 +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 24525E00029F for ; Wed, 12 Dec 2007 01:40:36 +0000 (GMT) Date: Wed, 12 Dec 2007 01:40:36 -0000 To: users@openjpa.apache.org Subject: Re: Problem using SynchronizeMappings (missing columns) From: "Daniel Dyer" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: User-Agent: Opera Mail/9.23 (MacIntel) X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 12 Dec 2007 01:27:20 -0000, Daniel Dyer wrote: > Everything appers to work OK and there are no error messages, but when I > check the tables in the database (MySQL 5), although they have been > created, most of the columns are missing. The only columns 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. OK, I've found the problem 5 minutes after posting. It seems that the fields that weren't being mapped were ones that I had declared final (Hibernate apparently allows these fields to be mapped even though they are final). Removing the final modifier solves the problem. If OpenJPA had logged an error or warning, I wouldn't have wasted so much time. Thanks, Dan. -- Daniel Dyer http://www.uncommons.org