self-relation
Greetings! I am from Colombia. I was reading the doc on self-relations and I have a problem regarding the interpretation of the relationships or rather the fields that are generated from them.
I have based myself on the previous model to make my own model. (capture #1)
then i run my service to create a record where "lora" will follow "testedarcode" i.e. lora is follerId and testedarcode followingId (captura#2)
However, the result is this (screenshot #3)
This is exactly what I want to achieve, but I had to invert the id fields in my schema to achieve this result. If I do it as the doc indicates, the result is inverted and the follower becomes followed, that is, even though "lora" is following "testedarcode" it would come out inverted as if "testedarcode" was following "lora". Why does this happen? Am I reasoning wrong? I have the impression that my schema is wrong, but I don't know what to do or how to interpret the relationships.
0 Replies