Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据模型关联-"指定关联模型的选取字段"和"按关联模型的字段查询条件" 查询条件均未生效 #41

Closed
liushuainice opened this issue Mar 10, 2022 · 5 comments

Comments

@liushuainice
Copy link

image

image

这块的条件我尝试了多种形式,但都无效,无法对"relations"对象进行 select 和where查询

@liushuainice
Copy link
Author

image

hasOne和hasMany都照着测试了,关联查询和嵌套查询,条件好像都没有生效

@trheyi
Copy link
Contributor

trheyi commented Mar 10, 2022

文档稍后修正.

yao run models.user.Find 1 '::{"withs":{ "supplier": { "query":{"select":["name"] }} }}'

@liushuainice
Copy link
Author

测试指令没有问题

@trheyi
Copy link
Contributor

trheyi commented Mar 10, 2022

@liushuainice 嵌套查询 条件需要加在query里 ,文档相对滞后,稍晚些更新文档,并增加更多关联查询例子。
所以你的问题解决了吗?

@liushuainice
Copy link
Author

@trheyi 解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants