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
Cannot execute increment on column defined by embedded entity #3182
Labels
Comments
This seems a bit strange, considering that the following is the output of the increment function in the await this.
createQueryBuilder(entityClass, "entity")
.update(entityClass)
.set({
[propertyPath]: () => this.connection.driver.escape(column.databaseName) + " + " + Number(value)
})
.where(conditions)
.execute(); There should be at least a |
I'm tried with await manager.createQueryBuilder(User, 'u')
.update()
.set({
'friend.sent': () => `"friendSent" + ${Number(1)}`,
})
.where({ id: user.id }).execute(); Query:
Error
|
We need a PR with a failing test for this issue. |
Thanks for the fix.
…On Sat, Feb 9, 2019 at 13:11 Umed Khudoiberdiev ***@***.***> wrote:
Closed #3182 <#3182> via #3578
<#3578>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3182 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIjDnV7WTgx09xnWpOEc-qV9cMoHFO8Kks5vLmaQgaJpZM4Y7QO_>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[ ]
@next
[x]
0.2.8
(or put your version here)I have a embedded entity contain some friend statistics of a User. When user send a friend request to other user, I want increase
friend.sent
counter but the query always try to updatenull
tofrientSent
.My entity:
Query:
TypeORM generated SQL:
Error
The text was updated successfully, but these errors were encountered: