自动加入使用(JoinByOne,JoinByArray)

Auto Join using (JoinByOne , JoinByArray)

通常,用户需要手动选择需要加入的pieces/pages。例如 :

可以通过编程加入吗?如果通过游标的某些属性可用,那么我希望它与我当前的作品相结合。否则,它将 return 为空。

The main purpose is to not manually search/browse my piece. I need it to be Auto join / programmatically join without user need to browse the piece by themselves. If not , I have to enable sendmail to admin to tell that, "Your blog receives Likes ! Join it to your blog piece now !" . Something like that.

在 self.beforeInsert 上看看他们是如何做到的:

https://github.com/apostrophecms/apostrophe-samples/commit/7f0b2b90377be4c4be216c8213ca4783ed2ec656

有关游标的文档的更多信息:

https://apostrophecms.org/docs/tutorials/intermediate/cursors.html