Replies: 1 comment 2 replies
-
Hey @Sayanel34 , |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi !
I have a very precise way to use models, first with vuex-orm and now with pinia-orm.
I have a model called "ApiPlatformModel" which inherit from pinia-orm's Model.
This ApiPlatformModel is here to set a base to all models i'll use after that.
Now let's say i have a "Person" model, which inherit ApiPlatformModel but without the base entity, cause it's just a base model.
Everything's okay now, it's all perfect.
Now i have a "PhysicalPerson" model which inherit Person model, this time with baseEntity etc... Still no problem, works like a charm.
My real problem is here : i compile this package with my models cause i'll use them in different apps. Compilation seems okay, but now i want to use them in a Nuxt static application.
And when i want to use them, i'm getting an error : Class extends value undefined is not a constructor or null.
It seems that it's trying to use a child model before fetching the parent.
I had no problem before because we could chose the import order and reference to store, but now everything is auto imported through the extending of pinia-orm's Model.
I don't know if it's all clear, let me know if not. If anyone has something in mind i'll be glad to test it.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions