overwrite try parse method from primitive #634
-
Hi, I would like to overwrite the existing tryparse methods that vogen hoists from the primitive so it supports some custom logic. What am I trying to do: I am trying to support model binding. I am using sqid to display numeral ids as hashes, as a primitive I am using an integer since that is the persisted type in the database. However to the external world this should be shown as hash (like youtube). However when I try to bind my route to the value object, this of course doesn't work because I am trying to bind a string to a value object that uses an integer as primitive. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @BlackBearFTW - you can turn off hoisting and provide your own methods. I can assist if you could provide a minimal repo showing what needs to be done. |
Beta Was this translation helpful? Give feedback.
-
You can now overwrite |
Beta Was this translation helpful? Give feedback.
You can now overwrite
Parse
andTryParse
. Vogen will see you've added your own and won't generate them.