mybatis注解模式的多表关联查询问题
按照网上的例子写的,并且将网上的例子练习之后也可以关联查询出。但用到项目中缺关联不起来了。打印sql语句只执行了SELECTrole_idroleId,uri,dbid_...
按照网上的例子写的,并且将网上的例子练习之后也可以关联查询出。但用到项目中缺关联不起来了。打印sql语句只执行了SELECT role_id roleId,uri,dbid_ from jc_role_permission where role_id=#{id}``` @Select("SELECT role_id roleId,uri,dbid_ from jc_role_permission where role_id=#{id}") public List<JcRolePermission> getUserInfoById(@Param("id") Integer id); @Select("select * from jc_role where role_id = #{id}") @Results({ @Result(column="role_id",property="id"), @Result(column="site_id",property="site_id_param"), @Result(column="role_name",property="name"), @Result(column="priority",property="priority"), @Result(column="is_super",property="all"), @Result(column="role_level",property="level"), @Result(property="jcRolePermissionList",column="id", many = @Many(select= "com.company.project.dao.JcRoleMapper.getUserInfoById")), }) JcRole findByIdAndSetPerms(Integer id);```
是只执行了
select * from jc_role where role_id = #{id} 展开
是只执行了
select * from jc_role where role_id = #{id} 展开
展开全部
private static void handleException(Exception e)
{
String msg = null;
if (e instanceof InvocationTargetException)
{
Throwable targetEx = ((InvocationTargetException) e)
.getTargetException();
if (targetEx != null)
{
{
String msg = null;
if (e instanceof InvocationTargetException)
{
Throwable targetEx = ((InvocationTargetException) e)
.getTargetException();
if (targetEx != null)
{
追问
这是干什么
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询