As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
[Titanium] Kinvey.Users.find is undefined on 3.5.2
Carlos Henrique Zinato
started a topic
about 6 years ago
Hi,
I'm migrating from version 3.4.4 to 3.5.2 and found a problem querying for users on my db with the newest version.
This is my code:
var u = Kinvey.User.getActiveUser();
var query = new Kinvey.Query().equalTo('friends._id',u._id);
query.notEqualTo('_id', u._id);
var stream = Kinvey.Users.find(query);
stream.subscribe(function onNext(e) {
//callback(e);
}, function onError(error) {
console.log(" ****** error: " + JSON.stringify(error));
});
On 3.4.4 everything just works. With 3.5.2 I get this:
{
"message": "undefined is not an object (evaluating 'Kinvey.Users.find')",
"line": 1086,
"column": 30,
"stack": "my_function_name\n"
}
Is it something new or a bug?
Thanks!
Best Answer
P
Pranav J
said
about 6 years ago
Carlos,
Apologies for the delay.
Kinvey.Users was removed in 3.5.0 of the core (kinvey-js-sdk) in favor
of Kinvey.User. Kinvey.User does not contain a find API but instead is
replaced by a lookup API that mirrors the find API. For example the code
snippet above would like like the following:
var u = Kinvey.User.getActiveUser();
var query = new Kinvey.Query().equalTo('friends._id', u._id);
query.notEqualTo('_id', u._id);
var stream = Kinvey.User.lookup(query); // This is the change
stream.subscribe(function onNext(e) {
//callback(e);
}, function onError(error) {
console.log(" ****** error: " + JSON.stringify(error));
});
Kinvey.Users was removed in 3.5.0 of the core (kinvey-js-sdk) in favor
of Kinvey.User. Kinvey.User does not contain a find API but instead is
replaced by a lookup API that mirrors the find API. For example the code
snippet above would like like the following:
var u = Kinvey.User.getActiveUser();
var query = new Kinvey.Query().equalTo('friends._id', u._id);
query.notEqualTo('_id', u._id);
var stream = Kinvey.User.lookup(query); // This is the change
stream.subscribe(function onNext(e) {
//callback(e);
}, function onError(error) {
console.log(" ****** error: " + JSON.stringify(error));
});
Carlos Henrique Zinato
Hi,
I'm migrating from version 3.4.4 to 3.5.2 and found a problem querying for users on my db with the newest version.
This is my code:
On 3.4.4 everything just works. With 3.5.2 I get this:
Is it something new or a bug?
Thanks!
Apologies for the delay.
Kinvey.Users was removed in 3.5.0 of the core (kinvey-js-sdk) in favor of Kinvey.User. Kinvey.User does not contain a find API but instead is replaced by a lookup API that mirrors the find API. For example the code snippet above would like like the following:
We have updated the devcenter code snippets for user discovery to use the correct API
https://devcenter.kinvey.com/titanium/guides/users#lookup
Thakns,
Pranav
- Oldest First
- Popular
- Newest First
Sorted by PopularPranav J
Apologies for the delay.
Kinvey.Users was removed in 3.5.0 of the core (kinvey-js-sdk) in favor of Kinvey.User. Kinvey.User does not contain a find API but instead is replaced by a lookup API that mirrors the find API. For example the code snippet above would like like the following:
We have updated the devcenter code snippets for user discovery to use the correct API
https://devcenter.kinvey.com/titanium/guides/users#lookup
Thakns,
Pranav
Pranav J
Thanks for bringing this to our attention. I have escalated it to engineering and will keep you posted on the progress.
Thanks,
Pranav
MLIBZ-1956
Carlos Henrique Zinato
1 month and...?
-
How do I use Kinvey in my web app?
-
Is it safe to include keys/secrets in my client-side JavaScript app?
-
Why is the activeUser null even though I am logged in?
-
Login does not work even though credentials are valid.
-
Social login doesn’t work.
-
Appending objects to an Array (HTML5 - JS)
-
New to node.js - need bootstrap to downloadfiles from Kinvey
-
Problem with Aggregation/Grouping
-
Internal Server Error using Twitter Sign Up
-
Data Store
See all 315 topics