Hi, i do not understand one monent:
HasMany relation required field with all ids of related models, but if these related models is very much, how i store it in one field?
For example my data containts field “forum_ids”, how do i make HasMany relation without this field? Related models has field “forum_category_id”, or its possible only with separated qurey?
Thanks and sorry for my english
{"ForumCategorys": [
{
"_id": {
"$id": "52b8168a01c25ee41b000029"
},
"name": "category_name",
"title": "Category 1",
"description": "Description for category",
"forum_ids": [
{
"$id": "52b8168a01c25ee41b00002a"
},
{
"$id": "52b8168a01c25ee41b00002b"
},
]
}
], "Forums": [
{
"_id": {
"$id": "52b8168a01c25ee41b00002a"
},
"name": "First",
"title": "This is first forum!",
"description": "Description for First",
"topics": null,
"posts": null,
"last_message_id": null,
"forum_category_id": {
"$id": "52b8168a01c25ee41b000029"
}
},
{
"_id": {
"$id": "52b8168a01c25ee41b00002b"
},
"name": "Last",
"title": "This is last forum",
"description": "Description for Last",
"topics": null,
"posts": null,
"last_message_id": null,
"forum_category_id": {
"$id": "52b8168a01c25ee41b000029"
}
}
]}