Hello friends. According to the Prisma documentati...
# orm-help
m
Hello friends. According to the Prisma documentation, Every relation must have exactly two relation fields, one on each model. But for my project it becomes inconvenient. The project has already become big. In addition, we are actively working with the prisma schema file, so we want to keep it clean and so that it displays only what we need. On the screen you see an example of one of our models - an account. Many other models are tied to it, but we will never request them directly through the account, so these few lines from the account are simply confusing and bloat an already huge schema file. Is there a way to tell the prisma to stop demanding relationship fields on both sides and add them when reformat?
👆 1
r
@Mykyta Machekhin 👋 There is no way to tell Prisma to prevent relationship fields on both sides. This is by design as you might need to fetch data from any one side of the relationship which is why the virtual field is required. I would suggest creating a feature request explaining your use case.