Re: Cross-model relationships and Entity Modeler

From: Chuck Hill (chil..lobal-village.net)
Date: Fri Jul 27 2007 - 00:31:26 EDT

  • Next message: Thomas: "Re: Cross-model relationships and Entity Modeler"

    On Jul 26, 2007, at 7:58 PM, Thomas wrote:

    > I've made great progress in migrating my framework to Eclipse. I've
    > reduced the number of errors from over 10,000 to zero.
    >
    > 8^)
    >
    > However I have another problem. The application using the framework
    > runs OK as long as I don't edit the relationships in Entity Modeler.

    EOModeler (some versions anyway) had a habit of leaving some unsavory
    things in the plist files. Some of which Entity Modeler can't make
    sense of. That could explain this.

    > I have five different EO Models, with a number of cross-model
    > relationships.

    I use cross model relationships all the time. I don't recall ever
    having a problem with them.

    > When I view the relationship in Entity Modeler (regardless of
    > whether I have both models open, or even have the project open in
    > XCode), the "Model" popup menu in Entity Modeler is greyed out,
    > showing the current model instead of the other model, and I can't
    > change it. The Destination popup is grey and empty. If I save this
    > model from Entity Modeler, the application fails on fetching the
    > related objects because the SQL generated is looking in the wrong
    > database. If I then edit the model in EOModeler and save it, the
    > application works.
    >
    > My Googling suggests that there should be no problem with cross-
    > model relationships. I have Eclipse version 3.2.1 and the WOLips
    > plugins are mostly 2.0.0.4061.

    I have an odd setup. Mike said so. :-) You may too. It sounds to
    me like Entity Modeler is having trouble finding all the models.
    WOLips has a solution for this. Under File - New you will find an
    EOModelGroup. Create one of those and add (references to) the five
    models and any EOPrototype models needed. Save it and then open this
    model group with Entity Modeler. That fixed the problem for me.
    Just remember to never open the model directly, always open the model
    group.

    Chuck

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Fri Jul 27 2007 - 00:32:44 EDT