Relative Content

Tag Archive for typeorm

How to query on TypeORM with the duplicate key on AND condition in find()

const salesList = await this.salesRepository.find({ where: { productId: productId, productId: Not(0) } }); Based on the above code, how to use the same key for the query? It throws me error ‘An object literal cannot have multiple properties with the same name. ‘ appreciate every helps. thanks. typeorm

Typeorm class and name property mismatch in the migration

I have encounter the issue with typeorm migrations. Sometimes my AWS DB clears the migration table and try to run the migration again, because it is not recorded in the migration db. Of course it falis,, because all relations exist. After the code inspection I have found, that the migration has name mismatch between classname and the name property like this: