How to populate values to Map of a POJO in MyBatis

467 Views Asked by At

I have a Java class that looks like this.

class Student {
    private String studeID;
    private String UUID;
    private Map<String,Object> attributes;
}

And I have SQL to get students as follows.

SELECT studeID, UUID, F_NAME, L_NAME, PHONE FROM STUDENTS;

Need to populate F_NAME, L_NAME, PHONE to Map<String,Object> attributes of class Student.

How can I achieve this in iBatis/MyBatis XML.

0

There are 0 best solutions below