Optional One-To-Many Issue - Ents
Hello! First I want to say I am loving using Convex, so thank you for creating such a fantastic product with a wonderful developer experience.
I have read through the issues relating to this and I just want to get final confirmation that what I'm trying to do is not currently possible, and that I am correct about the recommended approach if I am using Ents.
A request needs to have a "requester" and a "createdBy"; however, the approvedBy should be null until a future state when it is approved. I feel like this is a fairly common scenario. The error is
Edge "approvedBy" in table "requests" has too many potential inverse
; but what the problem really is, is that I cannot add optional
.
It sounds like the recommendation is to turn it into a many-to-many relationship, which enabled 0-many, even though in this case it doesn't really make sense. Maybe back to the drawing board on the model to find another creative way around this. Thoughts?2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Im basically doing this like:
there are some other tricks but i this should be right, getting the directional part can be weird. I have a lot of edges but also a lot of tradional ids that can be null