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

多对多关联模式下,不能对中间表的id或其它条件进行排序 #7016

Open
jroam opened this issue May 11, 2024 · 1 comment
Open
Assignees
Labels

Comments

@jroam
Copy link

jroam commented May 11, 2024

GORM Playground Link

版本:gorm的最新版。

Description

场景:

  1. 有一相册表,里面有很多的图片。
  2. 有一个产品表,封面图字段可以选择多张图片,每个图片可以被不同的产品选择。

当用多对多的关联模式时,会产生一个中间表,来记录产品选择的图片的对应关系。

需求:
查询产品的时候。使用Preload多对多关联,并按选择图片的先后顺序进行排序(不是按图片的先后顺序), 这时,是无法做到的。

请问下:能否加上这个功能? 谢谢!

@github-actions github-actions bot added the type:missing reproduction steps missing reproduction steps label May 11, 2024
Copy link

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.ioSearch Before Asking

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

No branches or pull requests

2 participants