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

Support for Many to Many Preload Joins #6952

Open
hamidrabedi opened this issue Apr 9, 2024 · 0 comments
Open

Support for Many to Many Preload Joins #6952

hamidrabedi opened this issue Apr 9, 2024 · 0 comments
Assignees
Labels
type:feature_request feature request type:question general questions

Comments

@hamidrabedi
Copy link

Describe the feature

I would like to request a feature that allows GORM to support conditional many to many (m2m) preload joins. Specifically, the ability to preload many-to-many relationships based on additional conditions and join statements. This feature should enable more complex data retrieval scenarios, allowing for conditional logic and multiple joins within a preload context.

Motivation

when dealing with complex data models, there is a need to perform complex queries involving many to many relationships with additional conditions. Current limitations in GORM necessitate workarounds, such as using raw queries or processing results in Go.
Implementing this feature would significantly enhance GORM's utility in applications with complex data models

Checkout Django-ORM or SQL Alchemy for similar feature.

Related Issues

Check this sample:
https://stackoverflow.com/questions/78296654/gorm-preload-doesnt-follow-the-join-conditions

@github-actions github-actions bot added type:question general questions type:feature_request feature request labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request feature request type:question general questions
Projects
None yet
Development

No branches or pull requests

2 participants