尝试从Parse.com中的用户表中查询所有用户

时间:2022-09-23 15:48:56

I am trying to print all users I have saved on Parse database on my screen. But somehow it doesn't work, I can print the data from all other tables expect the users... I think the problem is somewhere here, because when I change the "Todo" to User table it doesn't work anymore...

我正在尝试打印我在屏幕上保存在Parse数据库上的所有用户。但不知何故它不起作用,我可以打印所有其他表中的数据期望用户......我认为问题出在这里,因为当我将“Todo”更改为User表时它不再起作用.. 。

mainAdapter = new ParseQueryAdapter<ParseObject>(this, "Todo");
mainAdapter.setTextKey("title");

any suggestions? Thanks!

有什么建议?谢谢!

1 个解决方案

#1


The user class is special (so are a couple of others) because it's built into the platform. The name doesn't work because the name is private. As you can see _Users is the private name, but you shouldn't use it - you can't guarantee it won't change. The correct way to query is:

用户类是特殊的(因此还有其他几个),因为它内置于平台中。该名称不起作用,因为该名称是私有的。正如您所看到的_Users是私人名称,但您不应该使用它 - 您不能保证它不会改变。正确的查询方式是:

ParseQuery<ParseUser> query = ParseUser.getQuery();

#1


The user class is special (so are a couple of others) because it's built into the platform. The name doesn't work because the name is private. As you can see _Users is the private name, but you shouldn't use it - you can't guarantee it won't change. The correct way to query is:

用户类是特殊的(因此还有其他几个),因为它内置于平台中。该名称不起作用,因为该名称是私有的。正如您所看到的_Users是私人名称,但您不应该使用它 - 您不能保证它不会改变。正确的查询方式是:

ParseQuery<ParseUser> query = ParseUser.getQuery();