Open bajtos opened 9 years ago
I am facing the same problem. I'd like that implemented too. It is possible to execute find
filtering on just one field though, but I can not seem to find a proper way of expressing a filter on more than one field, joined with AND
, for example.
@jlgallego would you mind contributing this improvement yourself?
I have these methods implemented in the "fix_flatten" branch in my repository (https://github.com/ageneau/loopback-sdk-android). I haven't had time to rebase it on the latest changes yet. The "find" and "findOne" methods now take optional parameters.
Unfortunately, I don't feel I have the time for it right now. Anyway I think @ageneau 's work is worth a look & test.
Does anyone @bajtos or @jlgallego had a look on @ageneau job ? more an more people request this feature that decrease Loopback capabilities by this lack. I'm volunteer to help, but unfortunately not skilled enough to just do it.
@afaucogney I'm using @ageneau 's find() method and it works with 'filter'. If you wish to get started with solving this, I recommend to debug RestAdapter and com.strongloop.android.remoting.adapters.RestAdapter class. It constructs URL in the end which gets posted to the server. I'm happy to help/contribute.
At the moment, the
ModelRepository
class implements only a subset of methods provided by PersistedModel on the server.Most notably it is not possible to execute
find
with a custom filter.We should improve
ModelRepository
and include all built-in methods OOTB.Related: https://groups.google.com/forum/#!topic/loopbackjs/1xHq5vFRayk