POJO with map/list

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

POJO with map/list


I was wondering if there is a way for mybatis to retrieve the map/list/array object value that has been passed/mapped as a POJO. Something like:


public class notes {

private int id;

private hashmap<String, String> notes = new hashmap();

public int getId() {

return id;


public hashmap<String,String> getNotes() {

return notes;


mapper xml:

<insert id="insert">

insert into notes (id, notes1, notes2, notes3)

values (#{notes.id}, #{notes.notes.notes1}, #{notes.notes.notes2}, #{notes.notes.notes3})


Any help is much appreciated. Thanks.