SSM 两表联查 controller 用 Model 传值到 jsp
对应的是 实体类字段名,不分大小写 --多对一,,,
一对多:
1.通过 book 查 一方 author
[Author(aid=1, aname=李伟志, bid=1, books=[Books(bookID=1, bookName=Java, bookCounts=0, detail=从入门到放弃, author=null)])]
2.通过author 查多方book ,结果不一样 [Books(bookID=1, bookName=Java, bookCounts=1, detail=从入门到放弃, author=Author(aid=1, aname=李伟志, bid=1, books=[Books(bookID=1, bookName=Java, bookCounts=0, detail=从入门到放弃, author=null)]))]
共有 0 条评论