Open jpswensen opened 8 years ago
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Any update on whether this is acceptable? I can keep working off my own branch. I also just realized that another commit (related to filtering, but not nested JSON lists from include filters) also showed up in this pull request. I haven't used github pull requests much. I guess I should have made another branch to work off of for the second patch.
@gunjpan @jannyHou could you PTAL?
@jpswensen : Hi, could you please rebase your PR against the master and push so that I can get CI running. Thank you.
Can one of the admins verify this patch?
@jpswensen I am afraid we are no longer actively maintaining the project. Would you perhaps like to step up to become a maintainer yourself? If yes, then please leave a comment in https://github.com/strongloop-community/loopback-sdk-ios/issues/136
…lude filter to interpret arrays correctly.
I was trying to find a way to have the loopback-sdk-ios automatically include an NSArray of the appropriate model type when there was a filter request that had the "include" filter for a set of models with a hasMany relation. The attached pull request modifies the LBModelRepository to keep a global dictionary of the various repository objects and a modification of the modelWithDictionary to handle requests that have arrays of other model types.
Example usage: (1) Create a model that not only has its own fields, but also an optional array that allows for the "include" filter:
(2) Create a CustomerRepository object and a OrderRepository object so that they are both known to the new global repositoryDictionary
(3) Execute a findWithFilter that includes a "include" filter
(4) The objectList in Step (3) is a Customer model object that has the "orders" array populated with the associated orders. If the user had just done a query without the "include" filter then the "order" variable in the Customer model would have remained nil.