openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dyer" <danielwd...@dsl.pipex.com>
Subject Re: Problem using SynchronizeMappings (missing columns)
Date Wed, 12 Dec 2007 01:40:36 GMT
On Wed, 12 Dec 2007 01:27:20 -0000, Daniel Dyer  
<danielwdyer@dsl.pipex.com> 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

Mime
View raw message