I would like to have two colums with the same type of data
from
and to
this is a very simple example about the error
datamodel.prisma
file with a one columns from: Address!
// it runs fine
type Travel {
id: ID! @id
from: Address!
}
type Address @embedded {
district: String!
}
datamodel.prisma
file with two field with the same embedded from: Address!
to: Address!
// it runs fine
type Travel {
id: ID! @id
from: Address!
to: Address!
}
type Address @embedded {
district: String!
}
It throws the error
Errors:
Travel
✖ The relation field `from` must specify a `@relation` directive: `@relation(name: "MyRelation")`
✖ The relation field `to` must specify a `@relation` directive: `@relation(name: "MyRelation")`