-
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
Define models relations in JSON file or in JavaScript code #695
Comments
I feel it's too earlier for team to discuss the declarative relation file before story #1372 finished, we can revisit it later this month to groom it. |
I think this feature proposal would be covered by #1359 |
We'd like to move to LB4, but can't move until we are able to have relationships specified in a JSON model. Any idea on what milestone this issue will be a part of? Thanks! |
@elv1s what kind of relations are you looking for? We already support |
@elv1s maybe I misunderstood you. Are you saying that you would like everything relation-related to be provided by LB4 runtime based on few lines of JSON config? I mean the controller for REST API, repositories for accessing relation data, etc.? |
@bajtos, yes your second comment is what I was interested in. Right now in LB3 we are driving the creation of the API with JSON models. Will we be able to use LB3 JSON models with relationships in LB4? The relationships |
Cross-posting #1194 (comment).
Yes, I think that should work if you create the models using juggler's |
Hmm. I think our design should be flexible enough to allow you to do that, but I don't think we are going to support this use case out of the box, at least not in the next few months. I have left a comment elsewhere explaining how to automatically wire repositories and controllers for models, the approach may work for you too. See #1889 (comment) I think this discussion is somewhat related to Declarative Support #565 |
LB4 is great but changing model declaration will be hard to migrate from LB3 to LB4 without rewriting the whole application. Do you have any migration plan to follow from LB3 to LB4. |
We are fully aware of this concern. We are discussing migration paths from LB 3.x in the issue #1849 - feel free to join the discussion and/or upvote the issue. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
e.g. LoopBack 3 has models relations definition in JSON file or in JavaScript code
We would like to define models relations in LoopBack 4 as well. Definition of relations need to auto generate the api services.
The text was updated successfully, but these errors were encountered: