-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ReferencesMany relation type #2488
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bajtos Please assign the task to me. |
In most frameworks, hasMany do this behaviour by default (return only ids), but when you pass { include: 'entity' }, it behave like embedded. What you think about it? |
Is this relation not implemented in LB 4 yet? |
I need this relation, when will be implemented? It is highly necessary to work with mongo |
We are also using mongodb, and we have to either use hasManyThrough in those cases where referencesMany would be the obvious best choice according to mongodb data modelling best practices, or imitate referencesMany with custom repository methods. Either way it is inconvenient and has overhead costs. If there are any details about the implementation of this feature, can you please share them ? Also, can you recommend other workarounds besides the two I mentioned above? |
closes: loopbackio#2488 Signed-off-by: Mike Evstropov <mike.evstropov@gmail.com>
A ReferencesMany relation embeds an array of foreign keys to reference other objects.
An example model instance:
See also LB 3.x docs: https://loopback.io/doc/en/lb3/Embedded-models-and-relations.html
The text was updated successfully, but these errors were encountered: