I have a self-relation field in my datamodel (rela...
# orm-help
g
I have a self-relation field in my datamodel (relatedLatoms). When I use the createLatom method, how do I make sure that both the relatedLatom field of the new Latom, and the relatedLatom field of the related Latom are both updated with each other?
k
Odd, I would assume that a connection would work, but I've personally never considered the idea of having relations between the same fields. "Is that allowed? That seems like it should be allowed... unless there was some interesting 'oh, we can't do that!' gotcha that I'm not aware of that some Prisma guru would be able to point out and explain..." Are the relatedLatoms siblings of each other? If that's the case, wouldn't a new Latom possibly have multiple siblings to be related to? If that's the case wouldn't it be smarter to simply look at their parent's children?