Many to Many Relationship with Pivot with multiple types #1038
lucasantoniooficial
started this conversation in
General
Replies: 1 comment 4 replies
-
I think to what you described, technically the UnionType is a solution for it. I used it quite often in my project for the general issue that "something can return multiple things". I don't remember having this particular use-case with pivots though. Also: I don't use I'm not sure if we've a test covering this scenario. Maybe you can provide a simple self-contained example? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a problem in my code, that I have a pivot that needs to be multiple types, I don't know if this will help me, but it was the solution I thought.
I have two pivot tables that relate to another table, but the two pivot tables use a single table.
I have a Type of service table and it relates to two pivots and the two pivots relate to a table called delegate executes.
I want it to be possible for me to access the pivot of the service type and access the delegateExecutes, but it doesn't accept multiple types.
Is there any solution for this?
I tried using Union Type.
Beta Was this translation helpful? Give feedback.
All reactions