From fd6f0ac3b7347383f313f8ee5806097d3bd38da1 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 3 Nov 2023 16:36:34 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0uniCloud=20jql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/uniCloud/jql.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/uniCloud/jql.md b/docs/uniCloud/jql.md index 907f784b2..53bc61b79 100644 --- a/docs/uniCloud/jql.md +++ b/docs/uniCloud/jql.md @@ -730,10 +730,12 @@ skip limit ``` - ```js - const article = db.collection('article').where('article_id=="1"').field('title').getTemp() // 此处过滤article表,仅保留title字段。会导致下一步查询时找不到关联关系而查询失败 - const res = await db.collection(article, 'comment').get() - ``` +**临时表内如果使用field进行字段过滤需要保留关联字段** + +```js +const article = db.collection('article').where('article_id=="1"').field('title').getTemp() // 此处过滤article表,仅保留title字段。会导致下一步查询时找不到关联关系而查询失败 +const res = await db.collection(article, 'comment').get() +``` **组合出来的虚拟联表查询时可以使用的方法** -- GitLab