Start a new topic

Collections Module with Kinvey Reference?


quick question : Is it possible to use the "find" method and resolve a reference at the same time? (Like in the client-api)


Datacollection called "players" inside of this there is a field "user" which contains a Kinvey-Reference to the user Datacollection.

Now on my Businesslogic (to be able to send a push) i query for my needed players (works finde) and than ... want to send the push.


I can't get it to work. The docs just talking about a "user document" but what does this mean? A Reference, just the id?

So the question is, an i do something like


user : 'users'


like i do in the client-app - or is there another way?

(of course i could fetch each user by it's id in a seperated call but that doesn't seem very "handsome" )



Hi Nico,

There isn't a built-in way to do this in Business Logic, as the collectionAccess module is a direct-access wrapper around the node mongo driver, and Kinvey References are a Kinvey-level abstraction. We're planning to add helper methods in Business Logic at some point in the future, but for the time being, the only way to accomplish what you want is to execute a second query with the data from the first query.
Ah - ok :)
Login or Signup to post a comment