Hooks for data transformation?

I am looking to transform my JS camelCase convention into snake_case database convention before writing to the db. I have a serializer doing this on reads, and thought to look to hooks for a clean implementation on writes. Am I looking in the right direction? If so, I can’t seem to tell how to transform the model instance before writing to the db. Any tips or alternative directions?


1 Like

Thanks @jacksoncharles!