Re: How to migrate from Hibernate to Cayenne?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Feb 20 2008 - 16:20:25 EST

  • Next message: Mike Kienenberger: "Re: Specifying PK when creating a new object in DB generated PK mode"

    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.

    Andrus

    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: http://www.nabble.com/How-to-migrate-from-Hibernate-to-Cayenne--tp15596160p15598178.html
    > Sent from the Cayenne - User mailing list archive at Nabble.com.
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Feb 20 2008 - 16:21:04 EST