database configs

From: Mike Schrag (mschra..dimension.com)
Date: Sun Sep 17 2006 - 13:24:33 EDT

  • Next message: Ulrich Köster: "Re: Warnings when building wolips"

    I mentioned this in an earlier post, but I just committed some
    changes to Entity Modeler related to database configs and connection
    dictionaries.

    Previously, EOModeler would use the connection dictionary to
    determine what database you talk to. This has several failings as
    your projects get more complicated. 1) you typically have MULTIPLE
    databases that you want to target with a single model and 2) the
    relationship between connection dictionary and the prototypes you use
    is not explicit. For anyone following Entity Modeler, you know that
    we introduced the concept of an EODatabaseConfig, which provides
    support for the definition of multiple connection dictionaries along
    with explicitly choosing the prototype entity that is used for each.
    If you use Project Wonder, you will also find that it plays nicely
    with these, allowing you to simply identify the EODatabaseConfig by
    name that you want to use at runtime.

    However, lugging around connectionDictionary inside of Entity Modeler
    was kind of annoying, because it meant that there were two ways to
    edit this information and they didn't match up in terms of
    expressiveness (i.e. lack of prototype definition in connection
    dictionary). So in the new version, connectionDictionary is ONLY
    maintained for backwards compatibility. Internally, EM only deals
    with EODatabaseConfigs. It now has the concept of an "active
    database config". The active database config 1) will be used by
    Entity Modeler when you look at an attribute to see its data type, 2)
    will be written out in the connectionDictionary field in your
    index.eomodeld (for backwards compat), 3) will be bold in the outline
    view.

    When you open a model, it will look through your EODatabaseConfig
    definitions for a config that matches the connection dictionary
    defined in your model. If one is found, that database config will be
    set as "active". If a matching config is NOT found, a new database
    config will be created with the contents of your connectionDictionary
    and it will be named "Default". You will notice that when you open
    your model for the first time in the new version, it will likely be
    marked as dirty because it will be creating an explicit database
    config for your connection dictionary. In this scenario, it will
    preserve things like jdbc2Info (even though new configs won't write
    that data out), so you shouldn't actually see a difference at runtime
    if you don't use Project Wonder. The Adaptor tab on EOModel is now
    gone, since everything is now unified. So to edit your connection
    dictionary, you would just edit the Default (or whatever is your
    active one) database config.

    ms



    This archive was generated by hypermail 2.0.0 : Sun Sep 17 2006 - 13:24:39 EDT