Search code examples
javasqlspringibatis

Ibatis: Define a getter as a property on a result


Can I define a getter as a property on a result in Ibatis?

like

    <resultMap id=.... class=...>
       <result property="getSomeValue" column="valueColumn"/>

....

I haven't seen this in documentation so far.


Solution

  • Let's say the getter is

     public Value getSomeValue(){
            ...
        }
    

    then the result would look like

     <result property="someValue" column="valueColumn"/>