Sure. But the separate file is even more flexible because it allows
you to have completely different names, add maps, subtract maps.
Properties only allow you to change existing lines. What if I want to
add NewTable.xml to test but not to prod?

With properties you also have to have a rigid file structure or else
you'll have to define propeties for every part of the path.

Worst of all, you have to modify lines in every single map file as
opposed to editing a single file.


On 4/29/05, Ron Grabowski <[EMAIL PROTECTED]> wrote:
> This is what property files were designed for:
> 
> <?xml version="1.0" encoding="utf-8" ?>
> <settings>
>  <add key="testOrProd" value="TEST" />
> </settings>
> 
> <sqlMaps>
>  url="c:/some directory/myDatabase/${testOrProd}/Account.xml"/>
>  url="c:/some directory/myDatabase/${testOrProd}/Order.xml"/>
> </sqlMaps>
> 
> --- Bob Hanson <[EMAIL PROTECTED]> wrote:
> > I think one small change would go a long way towards making
> > configuration as flexible as possible.
> >
> > Remove the <sqlMap> elements from SqlMap.config and allow <sqlMaps>
> > to
> > specify a URL to a separate maps.config file like:
> > <sqlMaps url="c:/some directory/myDatabase/TEST/maps.config">
> > or
> > <sqlMaps url="c:/some directory/myDatabase/PROD/maps.config">
> >
> > This way the maps can be defined in a single location. As my example
> > above shows, it makes it very easy to switch between a test and
> > production version of the maps. If you are using a DAL you don't have
> > to modify a bunch of elements in every SqlMap.config for every single
> > project that is using the DAL. They would all just point to the
> > version of the maps.config file that they need.
> >
> > Then, for similar reasons, add back the ability to specify the
> > location of providers.config in SqlMap.config so that it doesn't have
> > to be included with every project.
> >
> > On 4/28/05, Gilles Bayon <[EMAIL PROTECTED]> wrote:
> > > Or used syntax as
> > > in the SqlMap.config
> > >
> > > <sqlMap
> >
> url="E:/Projet/IBatisNet/Source/IBatisNet.Test/Maps/MSSQL/SqlClient/Account.xml"/>
> > >
> > > -Gilles
> > >
> >
>

Reply via email to