-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snakeCaseMappers works differently for objects and FieldExpressions #1089
Comments
Objection shouldn't touch the JSON fields at all. It's a bug that the inner keys actually do change in some case. |
@koskimas agreed, the option would've been an additional feature based on the "hidden feature" ;) I fixed this for us by:
|
I needed to revert the fix for this. It caused more problems than it fixed. |
any news on this? (thanks for your continued great work, by the way.) |
@lehni I did a proposal for this issue 😃 |
Using
snakeCaseMappers
, patching an object will not map inner keys, only the first level (columns), but using a FieldExpression will map the json field references.EDIT: IMHO, this should work consistently across, and there could be an option for
snakeCaseMappers | knexSnakeCaseMappers
, something likedeep|deepKeys|innerKeys
. Obviously I would prefer it to default tofalse
, and I'm guessing the usual expectation is around how the normal objects now work, but the default's not a big deal for me eitherway.The text was updated successfully, but these errors were encountered: