Re: Cayenne Modeler - Reengineer Database Schema issue

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Jul 30 2006 - 01:54:43 EDT

  • Next message: raggeler: "org.objectstyle.cayenne.ConfigurationException"

    Yeah, syncing the existing model can get hairy. As a general
    recommendation I would say do it by hand (add/remove attributes/
    relationships and such).

    However your specific case seems like something we should fix. Could
    you please log a Jira issue?

    Thanks
    Andrus

    On Jul 29, 2006, at 6:29 AM, Rashid Khan wrote:
    > Hello there,
    >
    > I am using cayenne-1.2 final release.
    >
    > I am having a problem using Reengineer Database Schema option in the
    > modeler.
    >
    > Let's say I have a User table with columns (user_id, username,
    > password). I
    > use Reengineer Database Schema to generate the db and object
    > entities for
    > the User table. Everything works fine.
    >
    > Now let's say I add a new column called 'user_description' to the
    > User table
    > (ie. drop the existing user table and create a new user table with the
    > additional column). I want to generate the db entity again. So, I
    > click on
    > Reengineer Database Schema and choose to overwrite existing User db
    > entity,
    > the User *db* entity gets generated and replaces the old one.
    > However, the
    > User *object* entity does not get replaced. Instead a new object
    > entity
    > called *User1* is created.
    >
    > What I would prefer is that I should be able to sync the old User
    > object
    > enitity with the new User db entity. However, because of the
    > generation of
    > *User1* object entity this does not seem to be possible. When I
    > click on
    > "sync ObjEntity with DbEntity" in the *User* object entity I get
    > NullPointerException. Is there a way to tell cayenne modeler to
    > generate
    > only db entity using Reengineer Database Schema and then sync the
    > old object
    > entity with the new db entity?
    >
    > I hope my question is clear.
    >
    > Thanks,
    >
    > Rashid Khan



    This archive was generated by hypermail 2.0.0 : Sun Jul 30 2006 - 01:55:04 EDT