ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samnang Chhun <samnang.ch...@gmail.com>
Subject Internal constructor problem
Date Fri, 20 Jul 2007 02:38:20 GMT
Hi all,

I'm just getting to work with iBatis.Net in my C# project, but I have a
problem with internal constructor. My class has an internal constructor that
doesn't want client side to access this constructor and has another
constructor for client side. In my ResultMap, why can't I call internal
constructor in my ResultMap, but I can map internal property in my
ResultMap. What have I done something wrong with constructor? Does
iBatis.net support this feature?


I have a class:

public class Person


      internal int _id;

      internal string _name;

      private bool _isNew;

      public Person()


            _isNew = true;


internal Person(int id)


            _id = id;






    <resultMap id="PersonResult" class="Person">


                  <argument argumentName="id" column="PersonId" />


        <result property="_name" column="name" />




    <select id="SelectAllPerson" resultMap="PersonResult">

      SELECT PersonId, name FROM Person




I hope to hear from you soon.




View raw message