简体   繁体   English

还可以通过iOS的Parse.com获取父母和子女

[英]Get both Parent and Child also with Parse.com for iOS

I've been looking for more than a day, and I can't find answer to the following, 我一直在寻找超过一天的时间,但找不到以下答案,

Is there a way to query for a Parent Class and add the associated data from Child Class? 有没有一种方法可以查询父类并从子类中添加相关数据?

I am doing a voting app, and I am looking for a way to indentify the users who already vote to a particular question. 我正在做一个投票应用程序,我正在寻找一种方法来识别已经对某个特定问题进行投票的用户。 The Question Class is therefor the Parent of Answer Class... Is it the proper way to think ? 因此,问题班是答案班的家长……这是思考的正确方法吗?

Thanks in advance.. 提前致谢..

Regards, Ambroise 问候,Ambroise

I think you would have to query the child class and then you could use the includeKey on the pointer from your child class to your parent class and it will include any data associated to the class being pointed to. 我认为您必须查询子类,然后可以在从子类到父类的指针上使用includeKey ,它将包含与所指向的类相关的所有数据。

EXAMPLE: You would query all answers that point to X question and then you would include the question pointer to get the information associated with the question. 示例:您将查询所有指向X问题的答案,然后包括问题指针以获取与该问题相关的信息。

I have an example that I posted a few days ago for a query that uses the include key here . 我有一个例子,我几天前发布了一个查询,该查询在此处使用include键。

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

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