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.
This is a common problem. I've asked it via email and answered it once or twice via the community forums. The confusion comes from the console. It shows "Users". Perhaps the Kinvey Console should show "Users (user collection)" for some hope of clarity?
I
Ivan Stoyanov
said
about 10 years ago
Agreed that it's confusing, and we've been brainstorming solutions that would make it more clear. Besides the console renaming, one idea was to make 'aliases' such that getting collection User, user, Users or users would all return the right one. While this prevents you from actually having a separate collection with that name, this is not likely anyway, you are probably misunderstanding the built in feature and finally it would be confusing for you. Another option is to add a method modules.collectionAccess.userCollection() which returns the right one. Which one do you think is most intuitive?
J
Justin Noel
said
about 10 years ago
Ivan,
Thanks for the response. You are right that many of the options introduce confusion and even some code overhead. The docs clearly show "user" collection. Examples:
The problem is simply with the console. Since it shows "Users", developers like myself instantly think the collection is named "Users". Since I also name my collections with a capital and pluralized ( Invitations), I mistakenly think you do the same. Without referring to the docs, it's an easy mistake to make.
I think adding code to deal with misperceptions is just going to lead to nightmares down the road. I'd feel just changing the console to show "user Collection" is the most clear. It informs the developer of the correct name for the collection and is intuitive enough to show what you will received when you click on it. Maybe the "showing all users" description could also say "showing all users in the user collection"?
Doug Wood
Im my business logic I am trying to get a user in the 'Users' table by using the collectionAccess module.
However, not matter what I try the results are always empty. (I still get the 'success' callback)
If I run the same queries on anything other than the 'Users' table, I get the expected records back.
Is there something wrong with my approach below ?
I know for a fact that there is a User that matches the query criteria. I even tried to search by '_id' and no luck.
var collectionAccess = modules.collectionAccess;
collectionAccess.collection('User').find({"first_name": "Doug"}, function (err, userColl) {
if (err) {
logger.error('Query failed: '+ err);
} else {
logger.error('Query success: '+ JSON.stringify(userColl));
}
Thanks