好像
Parse.Query("_User")是规范的,但 Parse.Query("User") 和 Parse.Query(Parse.User) 也能工作.这些之间的行为是否存在差异?除了一致性之外,还有什么理由坚持一个而不是另一个?
is canonical, but Parse.Query("User") and Parse.Query(Parse.User) work too. Are there differences in behaviour between these? Any reason besides consistency to stick to one over the other?
Parse.User 看起来最好,因为它不依赖于字符串文字,但这不是我在文档中看到的.
Parse.User seems nicest, since it doesn't rely on a string literal, but it's not what I've seen in the docs.
推荐答案Using Parse.Query(Parse.User) 是首选方法,内部 User/Role/Installation 的实际类名类是_User/_Role/_Installation,所以你可以使用它们.
Using Parse.Query(Parse.User) is the preferred method, the actual class name for the internal User/Role/Installation classes are _User/_Role/_Installation, so you can use them.
使用 Parse.Query("User") 实际上不会查询内部 User 类,而是查找您自己的 User 类.您可以尝试使用User"作为类名创建一个新的 User 对象,您将在数据浏览器中看到两个 User 类,一个带有特殊图标,一个没有.
Using Parse.Query("User") will not actually query the internal User class, and will instead look for your own User class. You can try by creating a new User object using "User" as the class name, and you'll see two User classes in your Data Browser, one with the special icon and one without.
更多推荐
Parse.Query("
发布评论