简体   繁体   English

Parse.com SDK:PFRelation的目的是什么?

[英]Parse.com SDK: What is the purpose of PFRelation?

In the parse.com framework you can associate an object with another object with a PFRelation . parse.com framework您可以将一个对象与另一个具有PFRelation的对象相关联。 I was reading the Parse docs on this but I'm not finding a key point in the documentation. 我正在阅读有关此内容的Parse文档,但未在文档中找到关键点。 What exactly is the advantage of using a PFRelation ? 使用PFRelation的好处到底是什么? Like, does it make querying for thing faster or more efficient? 就像,它使查询事物更快或更有效吗? Does it make it easy for the parse database to keep track of things? 解析数据库是否易于跟踪事物? Someone help me out with understanding this. 有人帮助我了解这一点。

It makes the maintenance and usage of to-many relationships easy because you can add and remove individual relationships to the set and query the contents of the set. 它使维护和使用多对多关系变得容易,因为您可以向集合中添加和删除单个关系并查询集合的内容。 With other relationship approaches (like pointers) this is generally harder to do. 使用其他关系方法(如指针)通常很难做到。 It's hard to say about efficiency as that isn't documented but relationships are documented to be the preferred approach so we can assume that they are more efficient. 关于效率,很难说,因为没有记录在案,但是记录在案的关系是首选的方法,因此我们可以假设它们更有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM