Start a new topic

Kinvey GAE Business Logic Sub Document Operations

Please I want to know how to use the GAE integration business logic to add/update/delete subdocuments in a certain collection. is the API docs. No examples yet, unfortunately.
Thanks Ivan, I'm already aware of that but unfortunately there is no information about how to deal with sub documents in details
We don't provide a way to update sub-documents yet. You will have to fetch the whole document/entity, change it and save the whole thing.
So can I edit the kinvey-sdk project in order to add these features - MongoRequest and ArgumentType...etc - ?! in more details is the full features of MongoDB is open if I manage to form the correct request from the kinvey-sdk project ?! or there is somework needed from your side in Kinvery backend side as well in order to make this work ?!
Yes, there is some work on our side, because the SDK hits a REST API that only exposes full object updates.
Thanks Ivan for the feedback, I would like to know please if there is an available way now to perform text search on collections through the kinevy-sdk.

Not yet, we haven't exposed that. You can pattern match within specific fields however.
No problem, can you please provide a sample of a reference to matching patterns that you mentioned ?!
Hey Ismail, I ended up on this only now, you probably already found out about pattern matching.

But just in case, and also to complete the thread for anybody else looking for the same thing in the future, I perform a text search using regular expressions similar to this:

{'fieldName': { $regex: string-to-be-searched, $options: 'i' }}

and to search on multiple fields I just:

- compose a more complex query that searches for match on all those fields

- split the string that has to be searched in an array of sub strings, and use that array in the query instead of the initial string

It's probably not the best solution, but the only one that I thought I could adopt right now ;)
Login or Signup to post a comment