Category "typeorm"

TypeORM OneToMany and ManyToOne relations cases 500 error on GET request

After adding OneToMany and manyToOne relations in the entities and doing GET request it shows in postman 500 error. // Car entity @Entity({ name: 'car' }) expor

Is there a way to set initial value for auto incremented column in typeorm?

I am using typeorm with postgresql. I want my auto incremented primary key column to start from specific initial value instead of 1. Is there any solution in ty

"Illegal argument to function" in Postgres when doing select on a view with pgp_sym_decrypt() expression

I am using pg_sym_decrypt/encrypt to decrypt/encrypt some of the fields in my table. Decryption happens on select in a separate EntityComputed view that has a o

How to configure custom key for data that has composite primary key in @urql/exchange-graphcache cacheExchange

On the frontend I have a Cart, it has buttons to call a GraphQL mutation to increase or decrease the quantity of a product. The mutation worked as expected, exc

TypeORM - how to reuse entities across many projects?

I've had a few project which is using this same database and entities. How to reuse entities across all of this projects? I don't want to copy all *.entity.ts f

ERROR [ExceptionsHandler] Cannot read properties of null (reading 'concat')

Here What I did is I have a user entity and a role entity. Every user can have one role. I have set up many-one relationship in role entity. I have create an en

How to translate an raw SQL query to TypeORM query builder?

How would I convert the subQuery select with distinct to TypeORM querybuilder? Thanks. SELECT `time`, (case when `start` is NULL then 0 else 1 end) `is_reserved

NestJS/TypeORM: Cannot set property metadata of #<Repository> which has only a getter

I try to run my nestjstutorial app, the below error is showing. My backend is connected to a PostgreSQL db. TypeError: Cannot set property metadata of # which

Trying to use nominal typing for id in typeorm typescript

I was following this article TypeORM Best Practices using Typescript and NestJS at Libeo. I got to the point of using nominal typing in our entity ID @PrimaryG

Kubernetes new pod created, old deleted

I have a nodejs (nestjs) application running in a pod which downloads large csv files and then uploads these to a database (mysql, typeorm) I was tailing the lo

TS2305: Module '"typeorm"' has no exported member 'Column' with Ionic v6 and angular 12

I recently update Ionic v5 to v6 and angular v10 to v12 then this typeorm error is shown when I run the ionic build command ERROR in src/app/entities/ttAgrupac

NodeJS Typeorm doesn't see host in docker

I have 2 dockers composes. 1 implements an infrastructure with a reverse proxy, databases, database admins, etc. version: '3.7' volumes: mysql80_volume:

How to search tree structure with multiple types with TypeORM

thanks for reading and provide any suggestions or any keyword I can do more research. Quite new to TypeORM and have an issue on searching the tree structure wit

Migration from dataSource get the error: Cannot execute operation on "default" connection because connection is not yet established

My typeorm version is 0.3.6. Whenever i tried to use dataSource.runMigration() i get this error, MIGRATION ERROR:CannotExecuteNotConnectedError: Cannot execute

Cannot add cli parameters to DataSourceOptions in TypeORM

In the typeORM documentation a cli parameter can be added to DataSourceOptions according to https://github.com/typeorm/typeorm/blob/master/docs/data-source-opti

Postgres TypeORM - FK to PK that is also FK to another table - constraint error

In my NestJS application with postgres db I have these 3 entities: User, Writer, Book and a class named UserBaseEntity. export class UserBaseEntity { @Prim

TypeORM error when trying to create migration in CLI

I'm trying to use the TypeORM CLI to create a migration. I followed their guide but when I run yarn run typeorm migration:generate I get the error: $ typeorm-ts

Error message TypeError: this.subQuery is not a function appears

If I run the tests with jest, I got always the error message TypeError: this.subQuery is not a function with a reference on the marked line in the testModelDb.t

Nest.JS TypeORM "SCRAM-SERVER-FIRST-MESSAGE: client password must be a string"

I dont know why, but since I was cloning my working repository I am using on AWS to a local machine and try to run it, I am getting the following error: "SCRAM-

Lambda: DeprecationWarning: Buffer() is deprecated due to security and usability issues

I deploy Lambda with NestJS & TypeORM, and I got error when I using function: ERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to s