Top "Typeorm" questions

TypeORM is an object-relational mapper for TypeScript and JavaScript that supports many different databases like MySQL and PostgreSQL and platforms like Node.

TypeError: Class extends value undefined is not a function or null

I am getting the following error when trying to create these entities. TypeError: Class extends value undefined is not a …

javascript typescript typeorm
TypeORM subqueries

Based on typeORM docs on using subqueries, there are explained how to create subqueries. Example: const qb = await getRepository(Post).…

sql oracle typeorm typeorm-datamapper
TypeORM upsert - create if not exist

Does TypeORM include some functionnality to avoid this : let contraption = await thingRepository.findOne({ name : "Contraption" }); if(!contraption) // Create if not …

typescript typeorm
Does TypeORM supports raw SQL queries for input and output?

I would like to know if there is a feature of TypeORM that supports raw sql queries for Insert Update …

orm typeorm
What’s the difference between remove and delete?

For example, I have a TypeORM entity Profile: @Entity() class Profile { @PrimaryGeneratedColumn() id: number; @Column() gender: string; @Column() photo: string; @…

typescript typeorm
How to perform a like query Typeorm

Hello guys I'm trying to find all the results that have a in them. I have tried a couple of …

javascript typescript typeorm
Connection "default" was not found with TypeORM

I use TypeORM with NestJS and I am not able to save properly an entity. The connection creation works, postgres …

node.js postgresql typeorm nestjs
TypeORM how to seed database

I am running my Node JS backend using typeorm ORM. Coming from Entity Framework, it was very easy to seed …

typeorm
TypeORM: update item and return it

As far as I know, it's a best practice to return an item after it has been updated. TypeORM's updateById …

typescript rest orm api-design typeorm
TypeORM cannot find entities if entity directory was not set in configuration files

I'm using TypeORM with the fallowing configuration file: ormconfig.json { "type": "mysql", "host": "localhost", "port": 3306, "username": "root", "password": "my-secret-pw", "database": "…

javascript typescript typeorm