Skip to content
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

Fix issue with mapped fields and defaults on update #527

Merged
merged 3 commits into from
May 1, 2023

Conversation

dvictory
Copy link
Contributor

There is a bug with attributes that are mapped and use a default value.
The issue is that you cannot update the field once it's initially set, because the code is looking for the key and not the alias.

ex.

{ type: 'number', map: 'test_mapped_number', default: 0, onUpdate: false }

This fixes this issue.

Copy link
Collaborator

@naorpeled naorpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Let's make sure all CI checks pass and then will get it merged.

Thanks for the PR!

src/__tests__/entity.update.unit.test.ts Outdated Show resolved Hide resolved
@naorpeled naorpeled merged commit f0ae165 into jeremydaly:main May 1, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants