开始学习mybaits,有很多标签都不是很熟悉
oftype association 反向 user-》post
javatype collection 正向 post -》user
id标签 可以用result 代替,但是为性能,还是用用好
不错的文摘
http://www.cnblogs.com/YingYue/p/4150961.html
--------------------------------
对于resultMap的理解加深 就是从数据库里面的一堆数据,把它构造成一个一个的对象
column 数据库的字段
property 对象的属性
maybatis 官方解释
http://www.mybatis.org/mybatis-3/zh/sqlmap-xml.html
以后再补充
所用数据库表 一对多,和多对一所用的表一样的
http://www.yiibai.com/mybatis/mybatis-one2many.html