Is it possible to access key/value pairs of a map bean property through iBATIS? 
 I am trying a configuration similar to the one below, but get a message saying 
java.util.HashMap does not have a property named "key1."  Do I need to refactor 
my object, or is there a solution I'm just missing?
 
Thanks,
Gordon Shankman
 
BeanWithMap.java:
public class BeanWithMap {
...
private HashMap mapProperty;
 
public HashMap getMapProperty() {}
public void setMapProperty(HashMap map) {}
...
}
 
BeanWithMap.xml:
<update id="" parameterClass="BeanWithMap">
...
<ifNotNull property="mapProperty.key1">
do something
</ifNotNull>
 
<ifNotNull property="mapProperty.key2">
do something else
</ifNotNull
...
</update>
 
Gordon Shankman
Software Engineer
Northrop Grumman Information Technology - TASC
4805 Stonecroft Blvd.
Chantily, VA  20151
(703) 633-8300 x8670
 

Reply via email to