I have an
ASP.NET MVC 3 app written in .NET 4. I want to start using
lazy-loading, but that appears to be broken in ibatis 1.6.2 when used
with .NET 4*. I'd like to upgrade to mybatis trunk, but I see a few
problems right away:
1) ISqlMapper no longer exists. Should I simply replace it with
IDataMapper?
2) DomSqlMapBuilder no longer exists, and I have no idea what I
should replace it with. Here's how I'm currently using it:
var builder = new DomSqlMapBuilder
{
Properties = BuilderProperties, //
BuilderProperties is a NameValueCollection property in my repository
class
ValidateSqlMapConfig = true
};
var newMapper =
builder.Configure(sqlMapConfig);
newMapper.DataSource.ConnectionString =
connectionString;
newMapper.SessionStore = new
HybridWebThreadSessionStore(newMapper.Id);
Or better yet, is there a guide for doing this migration? Or is there
anything else I should be aware of when making this transition?
* I get an "Ambiguous match found" error when my lazy-loaded property
proxy is loaded. Here's a discussion thread about the same issue:
http://groups.google.com/group/mybatisnet-user/browse_thread/thread/7e00585615f8fa11