Hello, 

I start to use ibatis.net.

 

I've got some strange problems.

 

Problem 1:

When I write

Person per = new Person();

mapper.QueryForObject("select-Person-ById", "x1", per);

                Everything is ok.

                But if I write

                Person per = mapper.QueryForObject("select-Person-ById",
"x1") as Person;

      I've got

      PersoIBatis.Person..ctor()

                But I really have a constructor Person() for the class
Person.

 

Problem 2:

In the XML for mapping, for class Person I write a XML
Person.ibatis.xml, if I write <ParameterMaps>  in the end(just before
</sqlmap>). The xml is valid. But when I put it in somewhere else(at
beginning  in the end). The next element isn't valid.

For example,  

<ParameterMaps> 

 ........................

</ParameterMaps>

<ResultMaps>

............................

</ResultMaps>

I will have a message : Result maps is not valid in the name space
http://ibatis.apache.org/mapping

It seems ridiculous for me. There's an order.

 

If someone have the solution, please send me a message. Thank you very
much.

Reply via email to