You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes for #1089 mean that we can't have a property on the model that matches a key on a json field, but uses a different naming standard.
If we update the issue example to include a property with the same name as a json key it continues to alter the json key when it shouldn't. Example below.
I'd suggest modifying keyMapper to split on : and only map the left-handside
thejuan
changed the title
Model property name clashes with json keys
Model property name clashes with json keys if using different formats
May 14, 2019
We cannot change the keyMapper. The keys are handled that way because : is used as a separator with joinEager nested relations too. That's a design flaw I'd like to address in objection 2.0. I'll probably revert #1089 because it's causing more problems than it's fixing.
Changes for #1089 mean that we can't have a property on the model that matches a key on a json field, but uses a different naming standard.
If we update the issue example to include a property with the same name as a json key it continues to alter the json key when it shouldn't. Example below.
I'd suggest modifying keyMapper to split on : and only map the left-handside
The text was updated successfully, but these errors were encountered: