-
Notifications
You must be signed in to change notification settings - Fork 121
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
[FEATURE REQUEST] - Inlcude multiple data entities for a single service #2
Comments
+1 Yeah, this is a key feature, that needs to be added. |
is it still open? |
Yes, but it won't be implemented in this version of moleculer-db. |
Im happy to take a look at implementing this. I don't think it's too difficult but we would need to decide how to change the api for update / find / delete etc. @icebob do you have any ideas on how the interface should work? |
Any news on this? |
any workaround? do I need to create 1 service per table and communicate with each other? |
with modules u can make one service with multiple tables like this
|
Can we have a sneak peek with what's inside: I'm having the same problem. @JS-AK |
Is it possible with the sequelize adapter? Maybe show us what's inside the |
|
At present moleculer-db allows only for a single data model per service. There might be use cases where a service needs to manage multiple data entities (tables in a data schema).
Example:
Service: Access Control Service - a service managing role based access control for the stack.
Data Entities:
Currently, I would have to create a service for each data entity, i.e.
role-service
,roleGroup-service
,function-service
,roleRunction-service
.Each of these services will then link to the underlying data table, using the
model
property of the service, e.g.:Accessing the model methods:
It would be great if the
model
property could accept an array of model objects. Accessing these from the service, would look something like:The text was updated successfully, but these errors were encountered: