Replies: 1 comment 8 replies
-
Having an ORM plugin would be cool. I think most of the time you don't need an ORM but can get the benefits with auto generated queries and mutations with openapi-ts or similar. The benefit of an approach like Pinia Colada is that it lets you handle your service layer however makes more sense for your app. That way you don't have to write code you don't use. In order for something like this to go forward, it would need a lot more details and use cases 😄 |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ORMs like eloquent allow api return a resource with defined relations(hasOne, hasMany, belongsToOne, belongsToMany, hasOneThrough). For example, when query a post, a user data might be return at the same time:
In this situation, pinia-colada can provide an option to define relationships, and then when successfully responded, colada can put the user into cache, so that we can query the user directly from cache instead of query again.
Beta Was this translation helpful? Give feedback.
All reactions