How to use CustomCast with different parameters in same model #1893
Unanswered
ApetersDev
asked this question in
Q&A
Replies: 1 comment
-
Hmmm this seems like a bug. Going to test it in a unit test. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have created a custom cast which needs a parameter like it´s described here https://pinia-orm.codedredd.de/guide/model/casts#with-parameters
It works great for different attributes of a model if the cast is used with the same parameter but it is not possible to use the same cast with different parameters. The last cast definition wins and every cast will use the same parameter. How can we use the same cast with different parameters in the same model?
Beta Was this translation helpful? Give feedback.
All reactions