Re: modeler paths

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu May 26 2005 - 12:50:56 EDT

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-321) cross-DataMap ObjRelationship loses DbRelationships on load"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Haven't tried this in a while... As long as we support subdirectories from
    > the same root directory, I don't think we should go further and support
    > loading DataMaps from CLASSPATH in the Modeler. This looks like asking for
    > trouble.
    >
    > .... unless we start treating cayenne.xml as yet another project resource,
    > and introduce a file similar to Eclipse .classpath that can be used to map
    > arbitrary locations. I think Cayenne will evolve in this direction over
    > time (I have some other ideas how to make configuration more flexible and
    > extensible ... I guess every framework evolves into a "container" with
    > time :-)), but I don't see a quick and dirty fix.

    I just noticed that the process didn't work right with subdirectories
    either.
    It "moved" all of my maps and nodes to the root directory when I saved the
    changes.
    For now I'll go back to putting everything in the same directory.

    -Mike

    > > I have a model that references multiple maps in different locations. It
    > > works fine from my applications (via the DefaultConfiguration
    > > classloader).
    > >
    > > <domain name="ENG_WORK_MGMT">
    > > <map name="EngWorkMgmtMap"
    > > location="com/gvea/eng_work_mgmt/model/EngWorkMgmtMap.map.xml"/>
    > > <map name="CoreWorkMgmtMap"
    > > location="com/gvea/core_work_mgmt/model/CoreWorkMgmtMap.map.xml"/>
    > > <map name="AdminDbMap"
    > > location="com/gvea/admindb/model/AdminDbMap.map.xml"/>
    > > </domain>
    > >
    > > However, the modeler itself can't deal with the paths, probably because
    > > it only works with absolute file names.
    > >
    > > Is my only option to maintain two separate cayenne.xml files, one with
    > > classpath-relative names, and the other with file-system relative names?
    > >
    > > Note that this file is stored in com/gvea/cayenne/model. Actually, that
    > > gave me an idea. It does work if I move cayenne.xml to the root of my
    > > src directory. Not exactly what I want, but I suppose it's not the
    > > end of the world to have one file there.
    > >
    > > [Redirecting this to cayenne-devel instead of cayenne-user because the
    > > real question now becomes....]
    > >
    > > Any ideas for fixing the model to deal with the original layout? Or do
    > > we consider this an unsupportable configuration?
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu May 26 2005 - 12:48:47 EDT