0

I have a java class as follows

class GeoLocation{
// assume member variables
// ....
class GeoLocationStatus{
// ....
}
}

My Ibatis maps is as follows:

<resultMap id="GeoLocationStatus" 
class="com.app.GeoLocation$GeoLocationStatus">
        <result property="code" column="GEOCODING_STATUS"/>
    </resultMap>

    <resultMap id="GeoLocation"
        class="com.app.GeoLocation">
        <result property="latitude" column="LATITUDE" />
        <result property="longitude" column="LONGITUDE" />
        <result property="postcode" column="POSTCODE"/>
        <result property="status" resultMap="GeoLocationStatus"/>

    </resultMap>

I run a query whose resultMap is Geolocation, but i get error that resultmap GeoLocationStatus is not present in my xml file. However you can see that its there. Can anyone help me here

Chetan
  • 4,735
  • 8
  • 48
  • 57

1 Answers1

0

I had the Ibatis query in other abc.xml file which in turn was referring the above result set which is in other xyz.xml , so I had to refer it as

<result property="status" resultMap="xyz.GeoLocationStatus"/>

So basic principle is to mention the namespace

Chetan
  • 4,735
  • 8
  • 48
  • 57