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(3182): fixed increment/decrement values of embeded entity #3578

Merged
merged 2 commits into from Feb 9, 2019
Merged

fix(3182): fixed increment/decrement values of embeded entity #3578

merged 2 commits into from Feb 9, 2019

Conversation

vlapo
Copy link
Contributor

@vlapo vlapo commented Feb 4, 2019

Root of problem:
Current implementation of increment/decrement method for embedded property define values to update like this:

// ...
.set({
    "embedded.property": () => ...
})
// ...

But update query builder do not support define key as string with "dot notation path".

Solution:
Convert:

.set({
    "embedded.property": () => ...
})

to:

.set({
    embedded: {
         property: () => ...
    }
})

Note: Sure we can add support of "dot notation path" into set() method but right now set() method accept strongly typed argument and I think it is better keep this functionality and just update increment/decrement function as it is presented in this PR.

Fixes #3182

@pleerock pleerock merged commit 83ba2ba into typeorm:master Feb 9, 2019
@pleerock
Copy link
Member

pleerock commented Feb 9, 2019

Thank you!

@vlapo vlapo deleted the fix-3182-increment-decrement-embeded branch February 10, 2019 09:12
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