Git Product home page Git Product logo

mybatisnet's People

Watchers

James Cloos avatar  avatar

mybatisnet's Issues

Is it POSSIBLE for using a transaction between different threads?

I wanna use transaction command on a different thread.
  thread 1 : begin
  thread 2 : insert query
  thread 3 : commit!
That's it! But how can do this?

>>What version of the MyBatis.NET are you using?

ibatis.net 1.6.2.0 maybe..

>>Please describe the problem.  Unit tests are best!

I want to using a transaction with UI or remote.
example 1)
  In case of UI has buttons.
    [Execute the BeginTransaction]
    [Execute a query]
    [Execute the CommitTransaction]
    [Execute the RollbackTransaction]
  And Transaction would be called By User clicking a button.
  Even has executed BeginTransaction, but it occurs an exception with "transaction is not started" when user execute Commit or Rollback. I think that it causes for different thread.


example 2)
 In case of UI with Remote service (like WCF Service)
 also, an user uses [example1 program] on a remote site using WCF.


Please, help me or mail to [email protected]
Thank you.

Original issue reported on code.google.com by [email protected] on 20 Aug 2011 at 11:40

R15 Command Timeout maybe not fixed

I have checked only code change, I do not try to it run or test, 
but I think, that there is still a problem in fix revision 15.

http://code.google.com/p/mybatisnet/source/detail?r=15
 in method   CreateCommand - see bellow

there is a new line:
command.CommandTimeout = _dataSource.DbProvider.DbCommandTimeout;

which set command-timeout from provider setting. OK

But in case of connection is not null, following lines in this method set it 
back to 
connection timeout:

if (_connection!= null)
{
try // MySql provider doesn't suppport it !
{
 command.CommandTimeout = _connection.ConnectionTimeout;
}
....
----------------------------------------------------------
<code>
public IDbCommand CreateCommand(CommandType commandType)
        {
IDbCommand command = _dataSource.DbProvider.CreateCommand();
command.CommandTimeout = _dataSource.DbProvider.DbCommandTimeout;
command.CommandType = commandType;
command.Connection = _connection;

// Assign transaction
if (_transaction != null)
{
try
{
  command.Transaction = _transaction;
}
catch 
{}
}
// Assign connection timeout
if (_connection!= null)
{
try // MySql provider doesn't suppport it !
{
 command.CommandTimeout = _connection.ConnectionTimeout;
}
catch(NotSupportedException e)
{
if (_logger.IsInfoEnabled)
{
_logger.Info(e.Message);
}
}
}

//          if (_logger.IsDebugEnabled)
//          {
//command = IDbCommandProxy.NewInstance(command);
//          }

return command;
}

</code>

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 9:53

Update the Nant build files

We need to update the Nant build files for Data Mapper & Dao to use the latest 
version of nant and document the build targets.  We need build targets for .net 
framework versions 2, 3.5, and 4

Original issue reported on code.google.com by [email protected] on 20 Dec 2010 at 3:34

Fix the doc build process for the 1.x line

The documentation in the 1.x line needs updating. However, the build process is 
not trivial, and took me a while to get running (I'm a new doc committer with 
no prior docbook experience).

I am now able to build the documentation on Windows, but the output is less 
than ideal in PDF. This needs fixing, probably through tweaking of the 
stylesheets.

I will also try to produce the PDF output from a linux setup, which seems to 
have better support for docbook.

One thing to consider is also to move the documentation source to docbook 5 
(currently version 4.1.2 of the docbook format is specified in the doc source). 
The impact of moving to docbook 5 needs to be evaluated, and might solve the 
PDF format problem described above.

I'm initially putting this High priority and Bug, but I am not familiar with 
the project's "standards" on issues. Please correct if I'm wrong.

Resolving this issue will obviously be useful for the 3.x line documentation 
build process.

Original issue reported on code.google.com by [email protected] on 25 Oct 2010 at 1:39

需要最新的MyBatis.Net中文文档

What version of the MyBatis.NET are you using?
最新

Please describe the problem.  Unit tests are best!
需要中文文档

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


Please provide any additional information below.
加入DDD实例

Original issue reported on code.google.com by [email protected] on 2 Sep 2011 at 12:39

Huge results - want to iterate myself.

What version of the MyBatis.NET are you using? 1.6.2


Please describe the problem.  Unit tests are best!
Am generating some potentially very complex sql (this bit works fine), and need 
to download results which can be 10s of millions of rows. I don't want to load 
it into memory so really want to handle a yielded IDataReader which I can 
iterate row-by-row (without MyBatis trying to load the whole thing into 
memory). Is this possible? Couldn't find any documentation on solving this kind 
of problem with MyBatis. Are too many variations on rules to warrant my 
creating of hundreds of queries and bcp'ing.
Also, as resultant columns in query may vary depending on the customer database 
(I know - what were they thinking), makes my wanting to deal with the 
IDataReader directly more appealing.

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

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 May 2012 at 5:01

Documentation - cover page doesn't output correctly in PDF

In getting the doc to build again, there is one remaining issue with the cover 
page of all three manuals in PDF format (CHM doesn't have this problem). The 
information we want to appear does not appear on the cover page.

I have (temporarily) patched the tutorial to not use a custom cover page, so it 
uses the one defined in the standard stylesheet we import in ours.

Original issue reported on code.google.com by [email protected] on 27 Oct 2010 at 11:47

CommandTimeout on a statement basis

What version of the MyBatis.NET are you using?
IBatisNet.DataMapper.dll (version 1.6.2)
IBatisNet.DataAccess.dll (version 1.9.2)

Issue:

Hello we've got very big problem with timeout expiring often when using Ibatis 
with long transactions.

I realized that SqlMapper methods (QueryForObject<T>, etc) ultimately rely on 
SqlMapSession.CreateCommand
and that method is the one setting the commandTimeout on the command.

My methods use code like this:

protected T Select(string statementName, object parameterObject)
{
    IDaoManager daoManager = DaoManager.GetInstance(this);
    SqlMapDaoSession sqlMapDaoSession = (SqlMapDaoSession)daoManager.LocalDaoSession;
    ISqlMapper mapper = sqlMapDaoSession.SqlMap;
    return mapper.QueryForObject<T>(statementName, parameterObject);
}


How can I change them to be able to set the CommandTimeout.
I saw that almost all the methods are public so I guess it should be possible.

Could you give me any advice or code snippet?
I know that the connection timeout is copied to the command timeout but
changing the connection timeout in the connection string is not viable for us
because we cannot increase the timeout in the whole application.

Thank you very much for your help



Original issue reported on code.google.com by [email protected] on 8 Apr 2011 at 10:33

iBatis Framework 4.0 Ambiguous match

What version of the MyBatis.NET are you using?
Data Access 1.9.2
Data Mapper 1.6.2

Please describe the problem.  Unit tests are best!
If I run the project and unit test with framework 3.5, it works...but if I 
upgrade to 4.0 I get an error Ambiguous Match here
var builder = new iBatisNet.DataAccess.Configuration.DomDaoManagerBuilder();
                builder.Configure("iBatisConfig\\dao.config");

I've googled but no answer around...

Please help me!!!!

Original issue reported on code.google.com by [email protected] on 11 Mar 2011 at 11:15

Use IBatisNet develop a Web application, in fact, started to automate tasks in multi-threaded processing, processed once every 10 minutes, but the following problem

To initialize DaoManager in Global.asax
C # code
protected void Application_start (...) {
   / / Initialize DaoManager
   WZW.IBatisNet.SqlMap.DaoConfig.GetInstance (). InitBaseDaoManager ();

   / / Record system startup log
   Biz.SysLogBiz.GetInstance (). AddLog ("", Const.SYS_LOG_LOG_TYPE_SYSTEM_START, "system startup success!");

   Biz.AutoRunBiz.GetInstance ();

}



Automatic processing procedure is as follows:

C # code
public class AutoRunBiz
    {
        private static AutoRunBiz instance = null;

        public static AutoRunBiz GetInstance ()
        {
            if (instance == null)
            {
                instance = new AutoRunBiz ();
            }
            return the instance;
        }

        public AutoRunBiz ()
        {
            / / Timer is running
            Thread th = new Thread (new ThreadStart (this.Run));
            th.Start ();
        }

        private void Run ()
        {
            while (true)
            {
                Biz.MakePageBiz.GetInstance (). MakeIndex ();

                / / Executed once every 10 minutes
                Thread.Sleep (600000);
            }
        }
    }




Found that the system logs the following questions:

System startup system startup 2009-10-26 19:40:19
System startup system startup 2009-10-26 19:29:56
System startup system startup 2009-10-26 19:19:47

Every 10 minutes will be initialized once DaoManager

Description Global.asax the Application_Start every 10 minutes performed once, 
if not the automatic task processing, only the execution time Application_start

Master please help?

Original issue reported on code.google.com by [email protected] on 3 Feb 2012 at 12:33

There is no Get member named 'Wrapper' in class 'List`1'

There is no Get member named 'Wrapper' in class 'List`1'

  <insert id="insert2" parameterClass="MyBatisDynamicSQL.Wrapper">
      INSERT INTO DataTable (TenantID,ObjectID,Slot0)
      VALUES
      <iterate property="Wrapper" conjunction=",">
        (#Wrapper[].TenantID1#, #Wrapper[].ObjectID#,#Wrapper[].Slot0#)
      </iterate>
    </insert>

Original issue reported on code.google.com by [email protected] on 5 Jun 2013 at 12:43

Loading dynamic assemblies fails with 'System.NotSupportedException'

What version of the MyBatis.NET are you using?
I use iBatis.NET 1.6.2

Problem:
I have embedded providers tag in my SqlMap.config.
<providers embedded="ProjectName.providers.config"/>
I can't be replaced with following tag because of external requirements:
<providers embedded="providers.config, ProjectName"/>

With that specified iBatis should look for providers.config file by iterating 
through all assemblies. (Utilities\Resources.cs:438)
That worked on machines with .NET prior to 4.0

After moving to .NET framework >4 when iBatis code loads providers, following 
exception is thrown: 'System.NotSupportedException'. GetAssemblies does not 
only return dynamic assemblies.
This issue is related to CLR that runs our application.

This issue is also described here: 
http://bloggingabout.net/blogs/vagif/archive/2010/07/02/net-4-0-and-notsupported
exception-complaining-about-dynamic-assemblies.aspx

Expected output:
File providers.config is loaded successfully.


Original issue reported on code.google.com by [email protected] on 15 Mar 2013 at 6:52

Why not use BindingFlags.IgnoreCase

What version of the MyBatis.NET are you using?
All

Please describe the problem. 
When map to oracle,the class field  and the sqlmap file  should use uppercase
So what about add BindingFlags.IgnoreCase

Original issue reported on code.google.com by [email protected] on 28 Feb 2012 at 7:47

Informix.NET Provider configuration doesn't work

I'm using iBatis DataMapper 1.6.2, iBatis DataAccess 1.9.2 and Informix .NET 
Provider 2.81 included in Informix Client SDK 2.90.

When I use the configuration existing in providers.config for Informix .NET 
Provider, an exception is thrown calling the method 
daoManagerBuilder.Configure(".//Configuracion//iBatis//dao.config").

The exception is an "Object reference not set to an instance of an object" and 
it is thrown into CreateConnection() method of class DbProvider, in the call 
(IDbConnection)((ICloneable)_templateConnection).Clone();

I found that IfxConnection is ICloneable, but if the connection is not open a 
call to Clone() method throws the exception.

Original issue reported on code.google.com by [email protected] on 11 Aug 2010 at 1:22

Slow SQL map verification for databases with large table count

What version of the MyBatis.NET are you using?

1.6.2 DataMapper and 1.9.2 DataAccess

Please describe the problem.  Unit tests are best!

We use (I/My)Batis.Net with Databases containing 200 - 300 tables. We have 
built a utility to auto-generate everything for .NET (domain objects, mappers, 
XML, etc., and no, you can't have it... yet :D). Initializing all 200 - 300 
maps is very quick (a few seconds). Upon the first query, MyBatis verifies all 
result maps against the domain objects they map to using reflection, and it can 
be a 20 - 30 second wait (depending on your horsepower) before the query is 
even executed. Once this happens, everything is good to go. Just to be clear, 
I'm not talking about the XML validation option on a SQL map.

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

It would be awesome if MyBatis could be revamped to allow on-the-fly 
verification of domain objects against their result or parameter maps. I've 
looked through the source code and it's a bit more complicated than I had hoped 
or I might have tried to do this myself.

Please provide any additional information below.

One way we've tried to mitigate this is having whatever application is 
accessing our data framework fire off some queries on a separate thread while 
the user is starting their session. We can shave off a few seconds of loading 
time by getting the verification going straightaway, but it can still be an 
annoyance while the app or webpage sit their spinning until MyBatis can start 
returning results.

Are their any plans to address this and any other known performance issues in 
future versions? 

Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 12:36

I can't use member property by use sharp.

What version of the MyBatis.NET are you using?
Mapper : 1.6.2
Access : 1.9.2
Framework : 4.0

Please describe the problem.  Unit tests are best!

1. next style is good working.
    <select id="Find" parameterClass="MemberVO" resultMap="resultMemberVO">
    <![CDATA[
    SELECT
              MEMBER_ID
              , MEMBER_NM
              , MEMBER_PWD
    FROM      TB_MEMBER
    WHERE     MEMBER_ID = '$MemberId$'
    ]]>
    </select>

2. but next style is occure error ( error is ORA-00911: invalid character )
    <select id="Find" parameterClass="MemberVO" resultMap="resultMemberVO">
    <![CDATA[
    SELECT
              MEMBER_ID
              , MEMBER_NM
              , MEMBER_PWD
    FROM      TB_MEMBER
    WHERE     MEMBER_ID = #MemberId#
    ]]>
    </select>

however, i can't use "#". i want to use "#".

What is the expected output? What do you see instead?
ORA-00911: invalid character

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Nov 2011 at 8:00

Attachments:

Cannot find the http://ibatis.apach.org/mapping

What version of the MyBatis.NET are you using?
1.6.2

Please describe the problem.  Unit tests are best!
After ibatis move to google, I can;t find the updated link of 
"http://ibatis.apach.org/mapping". Is anybody there know about that?

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

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Jan 2011 at 1:34

mybatisnet invoke mysql procedure error

What version of the MyBatis.NET are you using?
1.6.2.0

Please describe the problem.  Unit tests are best!
i invoke a mysql procedure with a OUT parameter,it show error,
but when i invoke a mysql procedure not with a OUT parameter , it's ok.


What is the expected output? What do you see instead?
it should output a IList<T> ,but there is a error show "Parameter '?' not found 
in the collection" . Please provide any additional information below.

my  xml config as fellow
<parameterMaps>
 <parameterMap id="PagePara">
  <parameter property="p_table" />
  <parameter property="p_pageindex"/>
  <parameter property="p_pagetotal" clumn="p_pagetotal" direction="Output"/>
 </parameterMap>
</parameterMaps>

Original issue reported on code.google.com by [email protected] on 3 May 2013 at 7:55

Issue with select with iteration - "off by one" problem?

Hi,
I am using mybatis.net 1.6.2.0 (data mapper) with data access 1.9.2.0

I have "iterated" select like this:

<select id="GetIdsByPolicyIdAndCodes" resultClass="int" 
parameterClass="System.Collections.IDictionary">
                SELECT IDPredmetOsig
                FROM PredmetOsig
                WHERE (IDPolisa = #InsurancePolicyId#) AND SifPredmetOsig IN 
                <iterate open="(" close=")" conjunction=",">
                        #InsuredSubjectCodes[]#
                </iterate>
        </select>

#InsuredSubjectCodes# is key of entry in dictionary where value is list of 
strings. It works correctly if list of strings is of size 2 or greater. 

However if I pass list with just one element I got:

IBatisNet.DataAccess.Exceptions.DataAccessException : DaoProxy : unable to 
intercept method name 'GetIdsByPolicyIdAndCodes', cause : Index was out of 
range. Must be non-negative and less than the size of the collection.
Parameter name: index
  ----> System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Please provide any additional information below.

Ok, there is not much point in select...where...in with only one element but 
this is general purpose statement which should work regardless of size of input 
collection.

Original issue reported on code.google.com by [email protected] on 15 Aug 2011 at 6:31

Assembly.Load(): Fails / Unable To Load Resource Via T4 Template

Using SVN version of Subversion. Custom repository library embeds the 
SqlMap.config file into the assembly as a resource. The following is the 
initialization code that is used to setup the various custom repositories 
(shared base class):

    protected static void Initialize()
    {
      ConfigurationSetting configurationSetting = new ConfigurationSetting();
      configurationSetting.Properties.Add("nullableInt", "int?");

      string resource = String.Format("assembly://{0}/Configuration/SqlMap.config", Assembly.GetAssembly(typeof(BaseRepository)).GetName().Name);
      try {
        IConfigurationEngine engine = new DefaultConfigurationEngine(configurationSetting);
        engine.RegisterInterpreter(new XmlConfigurationInterpreter(resource));

        IMapperFactory mapperFactory = engine.BuildMapperFactory();
        _sessionFactory = engine.ModelStore.SessionFactory;
        _dataMapper = ((IDataMapperAccessor) mapperFactory).DataMapper;
      }
      catch (Exception ex) {
        Exception e = ex;
        while (e != null) {
          Console.WriteLine(e.Message);
          Console.WriteLine(e.StackTrace);
          e = e.InnerException;
        }
        throw;
      }

However, when attempting to use the specified custom data repository in a T4 
template, a System.IO.FileNotFoundException is generated with the name of the 
assembly containing the repository.

When tracing the problem, I discovered that if I pass in the fully qualified 
assembly name (Name=mydata,Version=1.0,etc) to the Assembly.Load function, it 
would work. My first thought was to just update the assembly:// reference with 
the full assembly name, however the new Uri() fails validation when creating 
the Uri. Instead, I updated the AssemblyResource() constructor to do a try 
catch, first attempting to load the resource as before and then to walk the 
loaded assembly references looking for a name match.

            assembly = Assembly.Load(resourceAssemblyName);

change to

            try {
              assembly = Assembly.Load(resourceAssemblyName);
            }
            catch (FileNotFoundException) {
              // Attempt to find assembly in loaded assembly list
              int index = 0;
              Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
              while ((assembly == null) && (index < assemblies.Length)) {
                if (String.Compare(assemblies[index].GetName().Name, resourceAssemblyName) == 0) {
                  assembly = assemblies[index];
                }
                index++;
              }
            }

Similar changes were made to TypeResolver.cs and DbProvider.cs. There should 
probably be a LoadAssembly() function created in a common module shared by all 
projects.

When not running in the T4 context, the exception is not thrown, so I'm 
assuming this is a dynamic compiler issue. The additional check to find the 
referenced assembly for the user shouldn't adversely affect performance.

Original issue reported on code.google.com by [email protected] on 13 Dec 2010 at 9:23

Error with the <generate> tag

What version of the MyBatis.NET are you using?
1.6.2 DataMapper and 1.9.2 DataAccess

Please describe the problem.  Unit tests are best!
When I use the <generate> tag in my update statement.Mybatis generate the wrong 
sql.

The log:
2011-03-17 15:11:24,802 [5700] DEBUG 
IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFactory [(null)] 
- Statement Id: [updateWorkLoad] Prepared SQL: [UPDATE  WorkLoad SET    ProjectId 
=  ?param0, Content =  ?param1, FillDate =  ?param2,    FillPersonId =  
?param3,    FillPersonName =  ?param4,  FillPersonDepartmentId =  ?param5 
    FillPersonDepartmentName =  ?param6  WHERE   Sid =  ?param7]

It miss a "," before "FillPersonDepartmentName".And every update statement is 
not correct.

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


Please provide any additional information below.
I have upload the sqlmap file.

Original issue reported on code.google.com by languanhao on 17 Mar 2011 at 7:29

Attachments:

Log file is not created when using log4Net logger

What version of the MyBatis.NET are you using?
ibatis.datamapper.1.6.2. 
VS 2008

Please describe the problem.  Unit tests are best!
Iam new to Ibatis....
Log file is not created at all after trying all the tricks...what am i doing 
wrong?

assemble.info file is in properties folder
web.config,log4net.config: in main project folder


Assembly.info file has:
[assembly: log4net.Config.XmlConfiguratorAttribute(ConfigFile = 
"log4net.config", Watch = true)]

Web.config file
<sectionGroup name="iBATIS">
            <section name="logging"
            type="IBatisNet.Common.Logging.ConfigurationSectionHandler, 
        IBatisNet.Common" />
</sectionGroup>
<iBATIS>
    <logging>
            <logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, 
  IBatisNet.Common.Logging.Log4Net">
                <arg key="configType" value="FILE-WATCH" />
                <arg key="configFile" value="log4net.config" />
            </logFactoryAdapter>
    </logging>
</iBATIS>

finally log4net.config has
<configSections>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    </configSections>

<appender name="RollingLogFileAppender"
        type="log4net.Appender.RollingFileAppender">
            <file value="Estatlog.txt" />
            <appendToFile value="true" />
            <maximumFileSize value="5MB" />
            <maxSizeRollBackups value="-1" />
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%5level [%date] %-40.40logger{2} 
%message%newline" />
            </layout>
        </appender>
<root>
            <level value="ERROR" />
            <appender-ref ref="RollingLogFileAppender" />
            <appender-ref ref="ConsoleAppender" />
        </root>

        <!-- Print only messages of level DEBUG or above in the packages -->
        <logger name="IBatisNet.DataMapper.Commands.DefaultPreparedCommand">
            <level value="ALL" />
        </logger>
        <logger name="IBatisNet.DataMapper.Configuration.Cache.CacheModel">
            <level value="ALL" />
        </logger>


What is the expected output? What do you see instead?
a Estatlog.txt log file created in the project folder

Please provide any additional information below.

y

Original issue reported on code.google.com by [email protected] on 10 Aug 2010 at 3:41

Support for inclusion of <result> fragments into <resultMap> elements

What version of the MyBatis.NET are you using?
IBatis.DataMapper.1.6.2

Please describe the problem.  Unit tests are best!
This is an enhancement request. I would like iBATIS to support <include/> kind 
of functionality for the <resultMap/> and <parameterMap/> elements -- Something 
similar to what iBATIS already provides for <statement/> tags family via <sql/> 
and <include/> tags.

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


Please provide any additional information below.
There are use cases where I have to map the results of different SELECT queries 
into objects which do not form any inheritance hierarchy, though these objects 
do share some properties (and unfortunately, their inheritance line cannot be 
changed), and this leads to a lot of repetition of <result/> elements in 
different <resultMap/>s. If I could have a feature similar to <sql/> and 
<include/> working for result/parameter maps as well, then it will really help 
in keeping the XML concise.

Original issue reported on code.google.com by [email protected] on 7 Aug 2010 at 2:34

Dynamic insert columns and values using mybatis

Dynamic insert columns and values using mybatis
Below i mentioned my code.Is it posible for doing like below...

 <statement id="insert" parameterClass="Attributes">
      insert into DataTable                                
           <iterate open="(" close=")" conjunction=",">
        (#[].AttributeName#) 
      </iterate>
      (TenantID,ObjectID,Slot0,Slot1)
      values
      <iterate open="(" close=")" conjunction=",">
        #[].AttributeValue#
      </iterate>
    </statement>

Like Ex: insert into TableName (id,name) values ('101','sekhar')

Original issue reported on code.google.com by [email protected] on 6 Jun 2013 at 1:52

Nullable int 32 number type handler fails when procedure returns a null rather than a number

Using trunk branch, but still occurs in other versions.

if NullableInt32TypeHandler.GetDataBaseValue gets called with a DBNull, it will 
fail because it tries to convert it to Int32 without testing for null.  Same 
happens with other nullable number types.  
I got this to happen with calling insert on datamapper when it is mapped to a 
procedure with returnclass as int? and the stored procedure or function returns 
null.

DataMapper.Insert("Diagnostics_WindowsEventCriteria", hash);

<procedure id="Diagnostics_WindowsEventCriteria" parameterClass="Hashtable" 
resultClass="int?" >
WINDOWSLOGSEARCHCRITERIA #Error# #ErrorSeverityId#
</procedure>

I would expect to get a null value back




Original issue reported on code.google.com by [email protected] on 25 Jan 2012 at 7:01

Inline parameter map. Support for size, precision, scale

It would be nice to have ability to specify parameter's size, precision and 
scale within inline parameter map. It will really handy in some cases and it 
will allow to have less .xml code (as now i have to create external parameter 
map just to specify parameter size). Thanks.

Original issue reported on code.google.com by [email protected] on 5 Nov 2010 at 5:59

Documentation source repository tightly coupled to tools folders

The current structure of the docs portion of the repository currently has 
placeholders for the tools required to build the doc (xsltproc, fop, docbook 
dtd and style sheets, ...). The various style sheets used in the documentation 
bundle expect to find the basic style sheets used by the tools in this 
directory structure, and the build script expects to find tools executables in 
this structure also..

This complicates working on multiple sandboxes at the same time, because the 
tools have to be copied in each sandbox. Moreover, when trying to build the doc 
on linux (where docbook and other tools are supported more naturally), you 
don't have control over where the tools are installed, they install in standard 
places (tools in usr/bin, stylesheets in usr/share/xml, ...).

I can appreciate the value of the current approach to control the dependencies 
between our documentation bundle and the tools, but I'm betting there is a way 
to code a flexible build script that can accommodate the various scenarios 
(e.g., tools and style sheets inside or outside the documentation bundle folder 
structure).

I will start working on such a script, and perhaps this will require extra 
style sheets in the various styles folders, because the paths to the style 
sheets are currently hard coded in the files in the styles folders. Perhaps 
there is a way to define the root of the various style sheet folders in the 
build script and pass these values to the tools and style sheets that use them, 
I don't know for now.

Original issue reported on code.google.com by [email protected] on 25 Oct 2010 at 7:00

Error using isNotempty with iterator

What version of the MyBatis.NET are you using?
1.9.2

Please describe the problem.  Unit tests are best!
Using a tag like the following :
        <iterate prepend=" " property="Filters"
            open="(" close=")" conjunction="OR">
          <isNotEmpty property="Filters[].GeometryType">
            GEOMETRYTYPE=#Filters[].GeometryType#
          </isNotEmpty>
        </iterate>
gives an error "Error getting ordinal value from .net object. CauseInput string 
was not in a correct format". I found that there was a similar issue in Java 
that was fixed. https://issues.apache.org/jira/browse/IBATIS-293.
I think this is still a problem with .Net.

What is the expected output? What do you see instead?
I get the error
Error getting ordinal value from .net object. CauseInput string was not in a 
correct format
Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Jul 2010 at 5:11

Error configuring DAO with .NET 4. Cause: Ambiguous match found.

Hi,

We are using IBatis Data Access 1.9.2 since a long time with .NET 3.5SP1 and 
it's working fine.
Also we decide to transfer part of the project to .NET 4 and we have some 
errors in the IBatis Builder.Configure method.

Please see the error below:

{"Error configuring DAO. Cause: Ambiguous match found."}
{"Ambiguous match found."}
   at IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager daoManager)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ParseDaoFactory(ConfigurationScope configurationScope, DaoManager daoManager)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetContexts(ConfigurationScope configurationScope)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetConfig(ConfigurationScope configurationScope)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers(XmlDocument document, Boolean useConfigFileWatcher)
   at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Configure(XmlDocument document)

We know that the problem comes from .NET 4.

Can you look on this problem because it's CRITICAL.

Thanks, David.


Thank you,

Original issue reported on code.google.com by [email protected] on 8 Feb 2011 at 2:08

Error configuring DAO while using Ibatis latest versions in VS2010 and running Unit tests in VS2010

What version of the MyBatis.NET are you using?
1.9.2

Please describe the problem.  Unit tests are best!

I'm fairly new to iBATIS and I seem to have hit a wall that I can't get around.

I keep getting the error message "Error configuring DAO. Cause: Ambiguous
match found", when I try to run my unit tests. Following are the points.

1.  Recently the solution has been converted from VS2008 to VS2010.
2.  All the projects are running with target framework of 3.5. So the 
application is running fine with the ibatis. If I change the target framework 
to 4.0 then I will be facing the same issue.
3.  As unit test projects uses frame work 4.0 by default and cannot be changed 
to any other framework, when I run the unit test which accesses the ibatis 
giving “Error Configuring DAO. Cause: Ambiguous match found”. It seems 
DynamicProxy exception. 
4.  I also tried the same by creating the  project in vs2010 with latest Ibatis 
version dll’s.

Is there any new version released which works with VS2010 (4.0). Please help me 
out. 


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

It should run with out ambigious error.

Please provide any additional information below.

Create a new Web project in VS2010. create new web page and add this page as 
default. Add gridview control to the aspx page.
Write necessary code to get the data from DB using Ibatis.
Use the below versions
Ibatis DataAccess 1.9.2
Ibatis Data Mapper 1.6.2.


Original issue reported on code.google.com by [email protected] on 30 Jul 2010 at 1:37

Work with SqlDependency

Running MyBatis.NET v1.6.1

Hi,

Is there a way to use SqlDependency in iBatis? rather than working with  
ADP.NET ?

Thanks,
Aviad




Original issue reported on code.google.com by [email protected] on 19 Jan 2011 at 11:33

How to get Table Columns using ibatis

     SELECT COLUMN_NAME  AS AttributeName
              FROM INFORMATION_SCHEMA.COLUMNS    
             WHERE TABLE_NAME= 'DataTable' AND COLUMN_NAME IN ('Slot' +'1')

Please help me..

Original issue reported on code.google.com by [email protected] on 5 Jun 2013 at 11:39

TimeSpanTypeHandler.cs 有问题。

    Gmij    2011-06-20 Edit
    从sql 2005开始,sql数据库支持Time类型,对应CLR中的TimeSpan,如果按原来的代码,将会引发类型转换错误。
    增加对值的判定, 如果dateReader.GetValue(index)的值是TimeSpan,直接返回

附件中的文件,是已修改的TimeSpanTypeHandler.cs,请查阅

Original issue reported on code.google.com by [email protected] on 20 Jun 2011 at 7:30

Attachments:

Where can I find source code for iBatis.NET 1.6.2?

What version of the MyBatis.NET are you using?

  1.6.2

Please describe the problem.  Unit tests are best!

  I can't find the source code anywhere any more.

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

  I expected to be able to download the source code.

Please provide any additional information below.




Original issue reported on code.google.com by [email protected] on 11 Mar 2011 at 10:22

ibatinet exception

What version of the MyBatis.NET are you using?
the version of the MyBatis.NET is 1.5.1.

Please describe the problem.  Unit tests are best!
I develop a project by visual studio 2010, and use the MyBatis.NET framework 
into my project, but there is a exception appearing when i try to debug the 
solution. the exception message described as below:
未声明“providerName”特性。
堆栈跟踪: 
[XmlSchemaValidationException: 未声明“providerName”特性。]
   System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity) +1585478
   System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg) +120
   System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo) +4025619
   System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo) +31
   System.Xml.XsdValidatingReader.ValidateAttributes() +204
   System.Xml.XsdValidatingReader.ProcessElementEvent() +168
   System.Xml.XsdValidatingReader.ProcessReaderEvent() +53
   System.Xml.XsdValidatingReader.Read() +49
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ValidateSchema(XmlNode section, String schemaFileName) +485
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) +387

[ConfigurationException: 
- The error occurred while Validate SqlMap config.]
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) +497
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, Boolean useConfigFileWatcher) +46
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate) +276
   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(ConfigureHandler configureDelegate) +43
   IBatisNet.DataMapper.Mapper.InitMapper() +111
   IBatisNet.DataMapper.Mapper.Instance() +108
   SqlMap.SqlMapBase..cctor() in D:\Study\Tools\NessaryBin\SqlMapBase1.5.1\SqlMap\SqlMapBase.cs:32

[TypeInitializationException: 
“SqlMap.SqlMapBase”的类型初始值设定项引发异常。]
   SqlMap.SqlMapBase.GetDataSet(String strTag, Object objParam) in D:\Study\Tools\NessaryBin\SqlMapBase1.5.1\SqlMap\SqlMapBase.cs:121
   Practice.Access.DengFeng.Sys_deptinfoDAL.GetList(Sys_deptinfo model) in D:\Study\Program\MyProject\IBatisProject\MyIBatis\SqlMapProject\Access\DengFeng\Sys_deptinfoDAL.cs:60
   Practice.Business.DengFeng.Sys_deptinfoBLL.GetList(Sys_deptinfo model) in D:\Study\Program\MyProject\IBatisProject\MyIBatis\SqlMapProject\Business\DengFeng\Sys_deptinfoBLL.cs:58
   WebUI.Default.Page_Load(Object sender, EventArgs e) in D:\Study\Program\MyProject\IBatisProject\MyIBatis\SqlMapProject\WebUI\Default.aspx.cs:19
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207.

In fact, this kind of exceptiong have occured several times, and i still can 
not find out where there is somethign wrong, so i send my project to you, i 
hope you can find out the where the problem occured.


What is the expected output? What do you see instead?
this project is a testing project, i wanna to show a datatable in the web.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Aug 2011 at 1:31

Attachments:

Concurrency and SQL Injection

      Recently,I am learning NPetshop-1.0.0.RC1 example with "IBatisNet.DataAccess 1.0.0.249" and "IBatisNet.DataMap 1.0.0.249".
      following two questions confuse me. 
      One is  that there is just one static "DaoManager" and one static "SqlMap" session handler, but how to deal with many concurrent calls, whether DaoManager will underlyingly create many concurrent connnections to database?  Further more, whether I should let "IBatisNet" get with concurrent calls situation for me, or what I can do is all by myself? 
      Another question is that  whether DAO framework has code to prevent "SQL injection"? 
      Because of can not successfully download the source code,so I have to get your help. Waitting for your helps. Thanks!


Original issue reported on code.google.com by [email protected] on 28 Jun 2012 at 1:24

isGreaterThan does not work with Enumerations

MyBatis.NET 1.6.2

the operator isGreaterThan doesn't work when used with enummerations
i have the snippet bellow in a dynamic statement 

<isGreaterThan property="Status" compareValue="-1"  prepend="AND">
          STATUS = #Status#
</isGreaterThan>

the condition is evaluted as true even if i set the Status property as 
ProblemeStatus.None( equivalent to -1)

Original issue reported on code.google.com by [email protected] on 23 Apr 2011 at 5:32

Patch for /trunk/src/MyBatis.DataMapper/Configuration/Interpreters/Config/Xml/Processor/Handlers/ProcessStatementElement.cs

It checks useStatementNamespaces first.when useStatementNamespaces is true,it 
adds Namespace ,else it only add element without appending Namespace.

According to older version,I find Statement ,Procedure,CacheModels check 
useStatementNamespaces first.then judge wether adding namespace

Original issue reported on code.google.com by [email protected] on 28 Feb 2012 at 12:59

Attachments:

i fount a bug in "IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs" line 66

What version of the MyBatis.NET are you using?
1.9.2
1.6.2

in this method "Create",you just set the "IDbCommand.CommandText" ,but 
some times,"IDbCommand.Connection.ConnectionString" will missing, 


should add 


" 
if (request.IDbCommand.Connection.ConnectionString == "") 
{ 
                request.IDbCommand.Connection.ConnectionString = 
session.SqlMapper.DataSource.ConnectionString; 



} 


" 

is this a bug ?? 


Original issue reported on code.google.com by [email protected] on 11 Aug 2010 at 2:28

3rd party .NET cache implementations integration

What version of the MyBatis.NET are you using?


Please describe the problem.  Unit tests are best!
Do we have any 3rd party .NET cache implementations integration?

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


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 9 Dec 2010 at 2:28

使用IBatisNet开发一个Web应用程序,其实启动了多线程来自动执行任务处理,每10分钟处理一次,但出现了如下问题

在Global.asax中初始化DaoManager
C# code
protected void Application_start(...){
   //初始化DaoManager
   WZW.IBatisNet.SqlMap.DaoConfig.GetInstance().InitBaseDaoManager();

   //记录系统启动日志
   Biz.SysLogBiz.GetInstance().AddLog("", Const.SYS_LOG_LOG_TYPE_SYSTEM_START, "系统启动成功!");

   Biz.AutoRunBiz.GetInstance();

}



自动处理程序如下:

C# code
public class AutoRunBiz
    {
        private static AutoRunBiz instance = null;

        public static AutoRunBiz GetInstance()
        {
            if (instance == null)
            {
                instance = new AutoRunBiz();
            }
            return instance;
        }

        public AutoRunBiz()
        {
            //定时运行
            Thread th = new Thread(new ThreadStart(this.Run));
            th.Start();
        }

        private void Run()
        {
            while (true)
            {
                Biz.MakePageBiz.GetInstance().MakeIndex();

                //每10分钟执行一次
                Thread.Sleep(600000);
            }
        }
    }




发现系统日志有如下问题:

系统启动 系统启动成功! 2009-10-26 19:40:19   
系统启动 系统启动成功! 2009-10-26 19:29:56   
系统启动 系统启动成功! 2009-10-26 19:19:47   

即每10分钟会初始化一次DaoManager

说明Global.asax中的Application_start每10分钟执行了一次,如果不��
�自动任务处理,则只会执行一次Application_start,

请高手帮忙?


Original issue reported on code.google.com by [email protected] on 2 Feb 2012 at 1:05

the conflict of statement id in sqlmap files

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 [email protected] on 25 Feb 2012 at 9:36

Read/write, nonserializable caching appears not to work

Read/write, nonserializable caching appears not to work because consecutive 
calls from the same thread to a SELECT statement with such a cache model return 
different objects.

Inspecting the logs reveals that this is because each request gets a new cache 
key, even though the SQL is identical.

There is an archived email thread about this issue here: 
http://www.mail-archive.com/[email protected]/msg02271.html In that 
thread, Gilles indicates that he checked in a test and it worked; however that 
test does not expose the issue because it does not use a read/write, 
nonserializable cache model.

Steps to reproduce:

1) Set up a SQL Map with a read/write, nonserializable cache model and a SELECT 
statement that uses it (example below)
2) Write a test that calls the statement twice in a row using one of the 
ISqlMapper QueryForXYZ() methods
3) Run the test with debug logging enabled. Examine the log and note that both 
statements result in cahce misses using different cache keys

SQL Map snippets:

<cacheModel id="rw-nonserializable-account-cache" implementation="FIFO" 
serialize="false" readOnly="false">
<flushInterval hours="24"/>
<flushOnExecute statement="UpdateAccountViaInlineParameters"/>
</cacheModel>
...
<select id="GetRWNSCachedAccountsViaResultMap"
resultMap="account-result"
cacheModel="rw-nonserializable-account-cache" 
extends="GetCachedAccountsViaResultMap">
</select> 

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 8:45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.