Replies: 1 comment 2 replies
-
Because the value from the database often comes in a different shape (e.g. arrays, JSON, even Point type or bigint), and we need to make it comparable, otherwise extra updates occur. When I comment that line out, 10 tests are failing because of this. I guess we can make this configurable via a method on the type class. |
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
-
I figured that
convertToDatabaseValue
on a custom type should only be called when the value is inserted or updated. However, it also gets called when selecting (and in my case, when populating), why?Is there a way to turn this behavior off? Specifically, I'm referring to this line in
ObjectHydrator.ts
. I'd like it turned off for allSELECT
queries involving my custom type. Two reasons: (1) the subproject where I'm re-using this custom type will only read from the DB, but never write; (2) the write requires an environment variable which I cannot make available in my subproject.In principle, my type is like this:
Beta Was this translation helpful? Give feedback.
All reactions