[ 
http://issues.apache.org/jira/browse/IBATISNET-69?page=comments#action_65973 ]
     
Ron Grabowski commented on IBATISNET-69:
----------------------------------------

I didn't see any code in to allow this kind of sqlMap.config file:

<?xml version="1.0" encoding="utf-8"?>
<sqlMapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="SqlMapConfig.xsd">
        
 <settings>
  <setting useStatementNamespaces="true"/>
  <setting cacheModelsEnabled="false"/>
 </settings>
        
 <database>
  <provider name="OleDb1.1"/>
  <dataSource name="XXXXX" connectionString="XXXXX"/>
 </database>
        
 <sqlMaps url="c:/some directory/myDatabase/PROD/maps.config" />
        
</sqlMapConfig>

http://tinyurl.com/df4cs
http://svn.apache.org/viewcvs.cgi/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?diff_format=l&rev=171288&sortby=date&view=markup

still has this code:

#region Load sqlMap mapping files                       
foreach (XmlNode xmlNode in 
_configScope.SqlMapConfigDocument.SelectNodes("/sqlMapConfig/sqlMaps/sqlMap"))
{
 _configScope.NodeContext = xmlNode;
 ConfigureSqlMap();
}
#endregion

See the attached file, LoadSqlMapMappingFiles.cs, for ideas on how to change 
the code.

> Allow sqlMap nodes to come from an external location rather than 
> /sqlMapConfig/sqlMaps/sqlMap
> ---------------------------------------------------------------------------------------------
>
>          Key: IBATISNET-69
>          URL: http://issues.apache.org/jira/browse/IBATISNET-69
>      Project: iBatis for .NET
>         Type: Improvement
>     Reporter: Ron Grabowski
>     Assignee: Gilles Bayon
>     Priority: Minor
>  Attachments: LoadSqlMapMappingFiles.cs
>
> "
> Re: Sharing Maps and Configs
> Bob Hanson
> Fri, 29 Apr 2005 13:38:23 -0700
> 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.
> "
> http://tinyurl.com/cln88
> http://www.mail-archive.com/ibatis-user-cs%40incubator.apache.org/msg00354.html
> http://tinyurl.com/dht49
> http://www.mail-archive.com/ibatis-user-cs%40incubator.apache.org/msg00416.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to