yuanhuawei / mybatisnet

Automatically exported from code.google.com/p/mybatisnet
0 stars 0 forks source link

the conflict of statement id in sqlmap files #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the MyBatis.NET are you using?
MyBatis 3 

Please describe the problem.  Unit tests are best!

the conflict of statement id in sqlmap files(like xxx.xml)
exam:
I set <setting useStatementNamespaces="true"/> in sqlmap.config
there two a.xml and b.xml . they all have the statement id "GetMaxId".
But the MyBatis 3 will be conflict it.

What is the expected output? What do you see instead?

The MyBatis 3 will remove statement id. At last,it says "The DataMapper already 
contains an ParameterMap named"

Please provide any additional information below.

the remove action works in file 
"yBatis.DataMapper.Configuration.DefaultConfigurationStore" line 472 
"private void AddToList(IConfiguration config, IDictionary<string, 
IConfiguration> dictionary, List<IConfiguration> list)"

Original issue reported on code.google.com by arhyb...@gmail.com on 25 Feb 2012 at 9:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Well should check whether useStatementNamespaces is setted.
MyBatis.DataMapper\Configuration\Interpreters\Config\Xml\Processor\Handlers\Proc
essStatementElement.cs

line 39
MutableConfiguration config = new MutableConfiguration(
                    element.Name,
                    element.Attributes[ConfigConstants.ATTRIBUTE_ID]);

it never check the useStatementNamespaces or and ApplyNamespace 

Original comment by arhyb...@gmail.com on 27 Feb 2012 at 2:49