307 Star 1.5K Fork 332

GVPThinkPHP / thinkphp

 / 详情

with不支持多个二级查询

待办的
创建于  
2019-10-10 14:57
$article = Article::with(['user', 'user.group', 'user.tags'])->find(1);

结果:

{
    id:1,
    title: 'thinkphp',
    user: {
        id: 1,
        name: 'thinkphp',
        tags: {
            { name: 't1' },
            { name: 't2' }
        }
    },
}

期望:

{
    id:1,
    title: 'thinkphp',
    user: {
        id: 1,
        name: 'thinkphp',
        group: {
            name: 'lv1'
        },
        tags: {
            { name: 't1' },
            { name: 't2' }
        }
    },
}

评论 (0)

qii 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
22061 qii 1578915420
PHP
1
https://gitee.com/liu21st/thinkphp.git
git@gitee.com:liu21st/thinkphp.git
liu21st
thinkphp
thinkphp

搜索帮助