-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Data Importing #80
Comments
@ritch Could you please elaborate a little bit more on the meaning of dolare and double-dolar keys? It seems that Perhaps we can auto-detect string (path to JSON file) vs. object (in-memory data), so that There are two functions needed to perform the import ( |
I'd like to have room to create more methods on the data set itself. It would also be nice if the |
@bajtos - updated the original post with a brief reference |
Importing data set for individual models seems to be straightforward. The connected/related data set are tricky, for example, a customer and a list of orders placed by the customer. |
I believe Ritchie's proposal solves this problem in rather elegant way. "orders placed by a customer" is the same relationship as "cars made by a manufacturer", you can find the latter in the sample code. |
@ritch I agree that a separate data type for importable data makes sense, but I would invert the relationship somewhat (if practical - thinking out loud here). I would look more to:
The This grants all kinds of cool powers, too. Replication, anyone? What about sync? Fun times. |
As part of our issue triage process, I am closing items that have been inactive for an extended period of time. If anybody thinks the feature proposed here is still relevant and should be prioritised, then please leave a comment to let us know. |
There are several use cases for importing data into a loopback data source. I've listed the ones that I can think of, feel free to add any.
Here is a basic example of an API and JSON format that could make implementing these use cases fairly straightforward and simple.
A bit of reference for the JSON format:
$$class: 'my-class-name
.The text was updated successfully, but these errors were encountered: