Category "typeorm"

How to workraound this TypeORM error, "EntityRepository is deprecated , use Repository.extend function instead"?

However, I can't find any Repository.extend method in Repository class and there's nothing about it in the documentation. How to solve this? typeorm version: "^

NestJS setup TypeOrm connection with .env and @nestjs/config

I'm trying to find the most legal way to set up NestJS database using .env file. That is I want to use @nestjs/config package for importing .env variables and u

NestJS - [TypeOrmModule] Unable to connect to the database. Retrying ER_PARSE_ERROR

Cannot able to connect database with correct connection info, followed documentation to connect database from https://docs.nestjs.com/techniques/database Databa

NestJS controller not mapped

So I have an API that will be deployed in a docker container. This API has the authentications controller, simple and not something special. When I start up th

NPM TypeORM - "Error: Duplicate migrations" after modifying/deleting migration file

I previously add a column to an existing table using, npm run migration:generate <filename>. However, I later realized that I misspelled the column name s

Typeorm bulk insert

I have the following Group entity export class Group { @PrimaryGeneratedColumn('increment') id: number; @Column({ type: 'varchar', unique: true }) name

How to use LEFT JOIN LATERAL in typeorm?

I want to use below query in TypeOrm but can't find a way to convert it to TypeOrm. Any help is appreciated. SELECT * FROM blocked_times bt LEFT JOIN LATERAL

How to unit test typeorm getRepository with Jest?

I am using typescript with typeorm and i have an repository like this: import { EntityRepository, getRepository, createQueryBuilder } from 'typeorm'; @EntityR

TypeORM SUM Operator on Relation's field

I am a student trying to develop a music library just to try out new technologies. Currently I use NestJS together with TypeORM as my backend technologies (as w

Typeorm createQueryBuilder.innnerJoinSelect() not returning the columns of a table

I'm attempting to select columns of two tables tradie,postcode_distance using innerJoinAndSelect but unfortunately, I'm not fetching those columns. Here's what

TypeORM Entity in NESTJS - Cannot use import statement outside a module

Started new project with 'nest new' command. Works fine until I add entity file to it. Got following error: import { Entity, Column, PrimaryGeneratedColumn

Update a table with its relations in TypeOrm

We have: Postgres Database Photo: import {Entity, PrimaryGeneratedColumn, Column, ManyToOne} from "typeorm"; import {User} from "./User"; @Entity() export clas

Dynamic database connection/initialization in typeorm `0.3.6` with Express

typeorm 0.3.6 deprecated createConnections() and and introduced DataSource. It is causing some issues with multi-tenant architecture. Either I have to initializ

How to transfer a filter to a query (TypeORM)

I want to get rid of the filter and put it in the request body. I tried using where, how can I do it? Questionnaire entity like: @OneToMany(() => LikeEntity,

How to save line breaks in database

I'm using typeorm to management my databse with nestjs framework on server and vuejs on client side, in settings i must provide a large text and i must to save

How to fix: No changes in database schema were found - cannot generate a migration?

I searched a lot and there are several questions like this however most of them do not have any answer or are not relevant to me. I'm using TypeORM(v0.2.45) wit

Typeorm How Can I get Min field with Where clause?

I use Typeorm and nestjs in my project. I have Schema: export class GroupEntity implements IGroup { // Attributes @PrimaryGeneratedColumn({ type: 'string' }

Expo TypeORM EntityMetadataNotFoundError

I'm trying to use typeorm on an expo project through driver expo-sqlite but I've been stuck on to this metadata EntityMetadataNotFoundError: No metadata for "Us

TypeORM Insert Cascade no effect

I Have a parent entity CostCenter that contains an Array of Coordinators, coordinators: Array<Coordinator> and this attribute has the typeORM annotations

The proper way to achieve database locks (Pessimistic Read and Write) with TypeORM and NodeJS

I have an application that needs to deal with concurrency/race conditions. I noticed user account balances were being updated wrongly. Multiple requests can rea