prisma-dbml-generator
prisma-dbml-generator copied to clipboard
Feature request ? do not output both the foreignKeys and related object
If I take the example from the readme, I see that both the Category object in post and the category-to-post relation are represented in the output.
I think the relation-as-an-attribute object categories Category should not be represented because it duplicates what the relationship table CategoryToPost says. (In the ways traditionnal diagrams are shown, and concretely, the attribute doesn't exist in the SQL schema that would be generated)
In this example, it's a Many to many, but this applies to One-To-Many as well.
Is there a workaround to hide these properties ?
Table Post {
id Int [pk, increment]
title String [not null, default: '']
content String
published Boolean [not null, default: false]
author User
authorId Int
categories Category // Should not be exported
}
Table Category {
id Int [pk, increment]
name String [not null]
posts Post // should not be exported
}
Table CategoryToPost {
categoriesId Int [ref: > Category.id]
postsId Int [ref: > Post.id]
}