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

Use Reference objects in HasMany and ManyToMany relations #363

Open
roxblnfk opened this issue Sep 18, 2022 · 0 comments
Open

Use Reference objects in HasMany and ManyToMany relations #363

roxblnfk opened this issue Sep 18, 2022 · 0 comments
Labels
type:feature New feature.

Comments

@roxblnfk
Copy link
Member

Hello @roxblnfk does that mean that the only way to create a new record that has a ManyToMany to existing records is to load those existing records and assign them to the ManyToMany property? This would have a pretty severe scalability issue in some cases.

Can you think of a workaround, like exposing a OneToMany relationship to the join table and using references to it when saving/updating a record?

Our API allows a user to give an array of primary keys for many to many relationships, we then would ideally create reference objects for each of these IDs instead of loading them into memory just to create the relationship.

Thanks

Originally posted by @longshadowdev in #338 (reply in thread)

@roxblnfk roxblnfk added the type:feature New feature. label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature.
Projects
Status: Todo
Development

No branches or pull requests

1 participant