How can I do a zero-to-many relationship to my model?
Does anyone have seen how to make it before?
Any chance we can annotate zero relationships?
Update March 2025: This feature was recently released. You can now test it by defining a relationship with and without nullability for the foreign key. For instance:
Table follows {
following_user_id int [ref: > users.id] // optional relationship
followed_user_id int [ref: > users.id, null] // optional relationship
}
Table posts {
id int [pk]
user_id int [ref: > users.id, not null] // mandatory relationship
}
Table users {
id int [pk]
}
The outcome will be as follows: