Upgrading from ibatis 1.6.2 to the latest mybatis trunk

239 views
Skip to first unread message

Mike Wyatt

unread,
Sep 14, 2011, 11:59:44 AM9/14/11
to mybatisnet-user
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

Michael

unread,
Sep 14, 2011, 4:59:06 PM9/14/11
to mybatis...@googlegroups.com, mybatisnet-user
With the 3.0 preview or1.62?

Sent from my iPad

Andrea Tassinari

unread,
Sep 15, 2011, 3:05:25 AM9/15/11
to mybatis...@googlegroups.com
here you can find ibatis 1.6.2 ready to compile for .net 4.0. I have
fixed a .net 4.0 reflection incompatibility. You can find DinamicProxy
1.5 as well

http://www.i-mconsulting.com/scambiofile/~andrea/ibatis.net.4.0.zip

Please remember that if you want lazy load for a single concrete object
you have to mark as virtual ALL of the that object class properties.

/@/

Christian Junk

unread,
Feb 3, 2012, 10:35:25 AM2/3/12
to mybatis...@googlegroups.com, andrea.t...@gmail.com
Hi Andrea,

could you please re-upload the file somewhere. The link is broken and I have the same problem mentioned above.

Regards,
Christian

Pedro Sousa

unread,
Feb 3, 2012, 10:52:22 AM2/3/12
to mybatis...@googlegroups.com, andrea.t...@gmail.com
--
Pedro Sousa

Christian Junk

unread,
Feb 4, 2012, 4:07:22 AM2/4/12
to mybatisnet-user
Hi Pedro,

thank you so much for answering that fast! With your upload I was able
to get everything working.

Best regards,
Christian

On 3 Feb., 16:52, Pedro Sousa <pedrocgso...@gmail.com> wrote:
> You can download here:http://www.2shared.com/file/VWOognBr/ibatisnet40.html
>

Stelio Macumbe

unread,
Aug 2, 2012, 5:32:49 AM8/2/12
to mybatis...@googlegroups.com, andrea.t...@gmail.com

Hi,
The link appears to be broken, can you please tell me where I could find the files.

Greetings,
Stelio

BoeroBoy

unread,
Aug 7, 2012, 11:20:28 AM8/7/12
to mybatis...@googlegroups.com, andrea.t...@gmail.com
BUMP.  I could use a src download too.  Log4net is missing from SVN.
Thanks

Michael McCurrey

unread,
Aug 7, 2012, 11:23:21 AM8/7/12
to mybatis...@googlegroups.com
There's a working sample on the downloads page from Andrea
--
Michael J. McCurrey
Read with me at http://www.mccurrey.com
http://chaoticmindramblings.blogspot.com/

BoeroBoy

unread,
Aug 7, 2012, 11:25:18 AM8/7/12
to mybatis...@googlegroups.com, mic...@mccurrey.com
As of right now, all download links above are 404...

Michael McCurrey

unread,
Aug 7, 2012, 11:29:31 AM8/7/12
to mybatis...@googlegroups.com
Reply all
Reply to author
Forward
Message has been deleted
0 new messages