-
Notifications
You must be signed in to change notification settings - Fork 38
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
Modified the LBModelRepository to allow filter responses with the inc… #116
base: master
Are you sure you want to change the base?
Conversation
…lude filter to interpret arrays correctly
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? |
…e reason, none of the nested Dictionary objects were doing queries correctly for AND and OR operations on WHERE. Adding this method allows me to test all filters using cURL and then use the exact same query string from within my application.
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. |
@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 #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.