Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [typeorm]

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

1 vote
0 answers
13 views

Unable to Resolve Dependencies from EntityRepository in TypeOrmModule. But EntityRepository doesn't exists

I am working on a NestJS project that uses TypeORM. Currently implementing a data feed in the 'command handler' pattern so each user has a customized output from the same endpoint. Error Message - [...
cryxnet's user avatar
  • 155
0 votes
0 answers
7 views

Using TypeORM in Nuxt 3

I am trying tu use TypeORM in a Nuxt 3 application. [email protected] [email protected] I added TypeORM as a plugin: // plugins/typeorm.ts import 'reflect-metadata'; import { defineNuxtPlugin } from '#app'; ...
nicodel's user avatar
  • 11
0 votes
0 answers
10 views

Typeorm PostgreSQL schema acts like not existing even it exists

I have a database in postgres with different schemas. I want to use schema named g which contains my tables, see: This is what app module looks like: ... TypeOrmModule.forRootAsync({ imports : [...
Martin Fric's user avatar
0 votes
0 answers
12 views

Typeorm Subscibrers UpdateEvent

async afterUpdate(event: UpdateEvent<Experience>) { const old_pub = event.databaseEntity; const new_pub = event.entity as Experience; const statusJustChanged = old_pub.status != ...
Toby Yhs's user avatar
  • 373
0 votes
0 answers
21 views

ER_NOT_SUPPORTED_AUTH_MODE Error even though mysql2 is being used [duplicate]

I am receiving an error ERROR [ExceptionHandler] ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client every time I try to ...
CairoMisr's user avatar
-2 votes
0 answers
20 views

Trouble using Post method in nest js

I used dto to recieve data with object with post in nestjs typeorm @Post(':userId/charge-amount') @HttpCode(HttpStatus.OK) async chargeUser( @Body() chargeAmountDTO : ChargeAmountDTO, ...
김민겸's user avatar
0 votes
1 answer
28 views

Why don't I automatically write time information to @CreateDateColumn?

this's my datebase column info; `create_time` datetime DEFAULT NULL COMMENT 'Create Time', `update_time` datetime DEFAULT NULL COMMENT 'Update Time', and this's my entity @CreateDateColumn({ type: ...
Zuxing Xu's user avatar
0 votes
0 answers
9 views

NestJS: Why does custom DB-logger (implementing TypeOrmLogger) only show DB-requests in log, not DB-responses

In my NestJS service, I've implemented a custom DB logger, which is meant to log both the before (requests), as well as the after (DB responses) info. I've done this by implementing the suggested ...
Schalk Sevenster's user avatar
0 votes
1 answer
18 views

How to run a specific migration file using typeorm in node.js?

I'm currently working on a Node.js project using TypeORM with PostgreSQL. I have multiple migration files, but I want to run only one specific migration file instead of all pending migrations. Below ...
Jaskaran's user avatar
0 votes
1 answer
29 views

How to select and enter all role names (separate column) in the incoming data field as an array in typeorm query

I have a typeorm library using nestjs and a mysql database which has a table user, user_roles (many to many) and roles. I also have a user who already has the super_admin role. const users = await ...
Dmitriy Novikov's user avatar
0 votes
0 answers
23 views

TypeORM fails to load postgresql tables associated with the id in Nest.js application

The problem I'm facing is that this query sometimes returns jobs where userId is not present in reviewUsers, inviteUsers, or favouriteUsers, despite expecting to retrieve all jobs where userId matches ...
Aleksandregvrm's user avatar
0 votes
0 answers
18 views

How to use a custom DB logger with TypeORM?

I am using TypeORM and NestJS. The default TypeORM logger seems to not log in JSON output format, which is what I want. How can I create a custom DB logger that allows me to customise how I want to ...
Schalk Sevenster's user avatar
1 vote
1 answer
43 views

TypeOrm QueryBuilder add a new field if a relation was exist

this is my products entity: @Entity() export class Products { @PrimaryGeneratedColumn() id: number; @Column() name: string; @Column() code: string; @Column({ ...
alireza kargar's user avatar
0 votes
0 answers
16 views

No metadata for "User" was found using TypeORM, ExpressJS, Supertest and Testcontainers

I am trying to write integration tests for an expressjs application which uses TypeORM and a PostgreSQL database. The main application works fine without any issues with a main datasource, migrations ...
greazleay's user avatar
0 votes
1 answer
25 views

How to dynamically inject a repository in Nestjs

I want to create a service that receives an entity and creates a repository. This is my attempt: export class MyService<T extends ObjectLiteral> { protected repo: Repository<T>; ...
Sherif eldeeb's user avatar

15 30 50 per page
1
2 3 4 5
323