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
Add a document. The document will have a deletedAt field with a value of null.
Delete document with softRemove.
Fetch the collection the document deleted still shows up.
// Repositiory
@EntityRepository(Configuration)exportclassConfigurationRepositoryextendsMongoRepository<Configuration>{asyncfindAllConfigurations(): Promise<Configuration[]>{constconfigurations=awaitthis.find()returnconfigurations}asyncdeleteConfiguration(configuration: Configuration): Promise<ObjectID>{awaitthis.softRemove(configuration)returnconfiguration._id}}// Entity
@Entity()exportclassConfigurationextendsBaseEntity{
@ObjectIdColumn()_id: ObjectID;
@Column(type=>Exchange)exchange: Exchange;
@Column(type=>Bot)bot: Bot;
@VersionColumn()__v?: number
@CreateDateColumn()createdAt?: Date
@UpdateDateColumn()updatedAt?: Date
@DeleteDateColumn()deletedAt?: Date}
My Environment
| Dependency | Version |
Operating System macOS Mojave Version 10.14.6
Node.js version v14.15.1
Typescript version
├─┬ @nestjs/cli@7.5.3
│ └── typescript@4.0.5
└── typescript@4.1.2
TypeORM version
└── typeorm@0.2.29
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
Yes, I have the time, but I don't know how to start. I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
Expected Behavior
As described in the document TypeORM will only pull "non-deleted" entities from the database.
Actual Behavior
TypeORM still pulls "non-deleted" entities from the database.
This is the output from findAllConfigurations method.
Steps to Reproduce
My Environment
| Dependency | Version |
Operating System macOS Mojave Version 10.14.6
Node.js version v14.15.1
Typescript version
├─┬ @nestjs/cli@7.5.3
│ └── typescript@4.0.5
└── typescript@4.1.2
TypeORM version
└── typeorm@0.2.29
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: