-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heterogenous data lists #1
Comments
@innovate-invent Thanks for the feedback! Yes, currently the "morph" relations are not implemented yet at this repo. I think once that's implemented, this should be possible too. |
I've opened #90 for MorphOne relation. |
@kiaking I am not sure the morphone relationship allows for what I am describing. MorphOne seems to allow an item to backreference a variable type, where I need to be able to deserailize a list of varying types. Am I misunderstanding how to do that with MorphOne as it exists? |
@innovate-invent Ah sorry, yes MorphOne is not exactly what you're looking for. However, we're working on implementing all Polymorphic relation like MorphTo and MorphMany and such so eventually you'll get what you want! Stay tuned 👍 |
Would you mind reopening this to ensure it isn't overlooked? I should point out that this type of relation wasn't available in the previous version either. |
Is your feature request related to a problem? Please describe...
The backend I interact with returns a heterogenous list of objects. This can't currently be processed by VuexORM. Each object has an attribute declaring its type.
or simply a fetch response can be
Describe the solution you'd like
Provide a relation that keys on the object type attribute and handles it accordingly.
The relation should accept a mapping of type attribute values to ORM models.
Describe alternatives you've considered
I am currently transforming the data using a request hook to split the lists.
The text was updated successfully, but these errors were encountered: