cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: How to migrate from Hibernate to Cayenne?
Date Wed, 20 Feb 2008 21:20:25 GMT
If you have a "regular" generated structure in your data layer, you  
can hack up a Velocity cgen template to match what you have for the  
Hibernate project and run it either with the Modeler or better - with  
cgen Ant task.

For some sample templates, check out "src/dotemplates/v1_2" folder in  
the Cayenne distro.


On Feb 20, 2008, at 11:05 PM, Thomas Bernhard wrote:
> Scott A wrote:
>> Take a look at the Cayenne Modeler; there is a feature to "Reengineer
>> Database Schema" on the tools menu. You may be unable to do this with
>> standard user-level permissions, depending on your database type and
>> configuration. Then you'll be able to generate the POJOs which should
>> resemble quite closely your hibernate POJOs.
> I'm aware of CM and the reengineer feature, but unfortunately it  
> does only a
> small part of the work.
> When the Hibernate applciation was made, it was mostly "generated"  
> with
> Hibernate Synchronizer.
> It has generated not only the POJOs but the DAOs and default queries  
> for the
> entire model too (and composite PKs too) - all these without tweaking
> directly from the config files (generated form the DB with  
> middlegen) with
> just a few clicks.
> CM however doesn't seem to have these "advanced" generation  
> features :(.
> Is the default "way" in Cayenne to do these manually?
> Thank you,
> Tom.
> -- 
> View this message in context:
> Sent from the Cayenne - User mailing list archive at

View raw message