Bean:
public class TestBean implements Serializable {
private Long id;
private List<Long> secondIds;
}
resultMap:
<select id="getTestBean" resultMap="getTestBean">
SELECT id, second_id FROM test
</select>
<resultMap id="getTestBean" type="com.TestBean">
<id column="id" jdbcType="BIGINT" property="id" />
<collection column="second_id" property="secondIds" ofType="long">
<result column="second_id" />
</collection>
</resultMap>