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
softRemove DeleteDateColumn is null at Susbscriber's AfterUpdate method #6327
Comments
+1: same with sqlite |
+1: same with postgresql |
So, we've got a bug here, I guess, but that still does not solve the problem. The function should return isDeleteDate or there should be a function for softRemove.
For some reason, this returns undefined.
Oh, yea. Query builder should use .withDeleted(). |
And the last one. typeorm/src/persistence/SubjectExecutor.ts Line 738 in a868078
Must be // update soft-removed entity properties
if (this.softRemoveSubjects.length)
this.updateSpecialColumnsInInsertedAndUpdatedEntities(this.softRemoveSubjects);
// update recovered entity properties
if (this.recoverSubjects.length)
this.updateSpecialColumnsInInsertedAndUpdatedEntities(this.recoverSubjects); |
+1 here |
hi there, any chances this will be fixed any time soon? |
I need a lot this fix |
The pr is been sent. But I don't have much experience with it. First CircleCI builds for cockroach failed due to timeout. Merge with the new version of typeorm passed the tests. But merge doesn't seem to be included in the pr. If you can help me with it, I would be very grateful. |
hi spotykatch, first of all thanks for your work! |
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[x]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Problem
softRemove()
method triggersafterUpdate()
without specified@DeleteDateColumn
I cant access deleted_at column to detect deletion of that entity and remove it from elasticsearch
Steps to reproduce or a small repository showing the problem:
Create User Entity with DeleteDateColumn decorator
Create UserSubscriber
Trigger softRemove on an entity
What it should do
Return removed entity with deleted_at column filled
What it does
Return entity with null deleted_at column
The text was updated successfully, but these errors were encountered: