A role corresponding to a plurality of users
generate getter and setter
to view data from two tables in the
middle of the table who defines the role, who was not the role of
the relationship middle of the table, check out the list of final data look. This requires two left outer link function can be achieved.
The first link on the left outside need to add conditional.
Go left outside links and user tables. Such implementation of the results that we want.
But there we do not need the information center of the table. Then the query is u. * And r. *
But the question will arise of id
which requires an alias from
the copied written statement.
Better way below the line or in the vacant space in front of
the user's id did not change, but think id in sql statement added alias called rid. So to rid role here to
test class test. User print inside the List object
Stage 3 1.Mybatis_09.Mybatis multi-table operation _8 mybatis-many operations - the query role get under your user role information
Guess you like
Origin www.cnblogs.com/wangjunwei/p/11320437.html
Recommended
Ranking