I have a data model in which is encoded a list, with each element of the list being a reference to either a game type 1 or game type 2. At the moment I have a flag to say which type and then both types. This is a bit ugly, and I was wondering if there is anyway I can do this using a union-type?
To make sure I’m understanding correctly, you would like to add a reference type input to select from multiple models? Is that right?
Yes. I have a ‘plan’ which can be either plan 1 or plan 2. Today I have an enum (Plan1, plan2) and then two references to the different plans. This is workable, but does offer the opportunity for an error (someone fills out both plans or fills out one plan and sets the enum to the other plan). It would be nice to be able to tie the enum to the plan so these errors can’t happen.