openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: schema generation, OpenJPA vs. Toplink
Date Fri, 16 Mar 2007 17:47:32 GMT
Jeff-

OpenJPA provides the ability to generate a schema to an intermediate  
XML file, but it doesn't require it. You can also create the schema  
directly against the database.

Using the intermediate XML file can be useful if you want to generate  
the schema, but then make additional modifications to it (like adding  
indexes) before actually building the schema against the database. It  
can also be useful to capture the schema locally, since OpenJPA can  
be configured to validate mappings against the schema file rather  
than validating it against database metadata (which can sometimes be  
slow).

For example scenarios for using the mappingtool, see:

   http://incubator.apache.org/openjpa/docs/latest/manual/ 
manual.html#ref_guide_mapping_mappingtool_examples



On Mar 16, 2007, at 10:43 AM, jeff wrote:

> i'm new here, so please excuse if this is a stupid question ...
>
> from my cursory look at OpenJPA, it seems that it takes a different  
> approach to schema generation than TopLink.
>
> Toplink generates a schema from annotations, where OpenJPA requires  
> one to provide a DB-neutral XML schema file. do i have that right?
>
> i am trying to understand the advantages of OpenJPA's approach.  
> from my naive standpoint right now, it seems less than optimal. if  
> the metadata is already captured in annotations, why require it to  
> be defined in the schema XML file?
>
> am i missing something?
> thanks.
>
>
>
>
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.


Mime
View raw message