Category "typeorm"

Postgres OVERLAPS date function in TypeORM

I want to transfer the query to TypeORM. It looks like this in Postgres SELECT * from equipment_charging where (equipment_charging."start_date"::date, equipme

TypeORM column type dependant on database

I have simple entity @Entity() export class File { @PrimaryGeneratedColumn() id: number; @Column({type: "mediumblob"}) data: Buffer; } Which

TypeORM problem saving entity with cascade true

I m using NestJS with TypeORM and I m trying to save a user conversation with messages. I set the messages field on the conversation entity to cascade: true. Bu

Entity metadata for Role#users was not found

Trying to make OneToMany and ManyToOne relationship with TypeORM but I get this error, I don't know what's wrong with my code. I have the following User entity:

Updating Multiple Records with varying conditions in a single query

With Typeorm + NestJS + Postgres is there a way to update multiple records with varying conditions and varying values in a single query. Normally I could do awa

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 Delete Select etc..

How can I create a TypeORM Postgres connection with Heroku using Typegraphql?

I want to create a TypeORM Postgres connection with Heroku using Typegraphql, but I receiving the following error message: 'createConnection' is deprecated.ts(6

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 function or null I am assuming this h

Can't join FREETEXTTABLE with typeORM functions

I'm working on a graphQL backend with TypeORM I found FREETEXT, CONTAiNS, FREETEXTTABLE and CONTAINSTABLE options for fulltext searching in my SQL database. As

How to validate request in typeorm controller

I have created a sample application to save data for a user. I wanted to know how to validate it before saving and showing the response in JSON. I have got a re

Typeorm of sql query

This query works well on the database, however I'm not able to make it work by using typeorm createQueryBuilder. SELECT * FROM content INNER JOIN FreeTextTable

TypeORM AfterInsert() can't add userId in another table

I have a user entity: @Entity() export class User extends BaseEntity { @PrimaryGeneratedColumn('uuid') id: string; //... @OneToOne(() => UserActive

How to show generated SQL / raw SQL in TypeORM queryBuilder

I developed typeorm querybuilder. For the purpose of debugging, I'd like to show the generated SQL query. I tested printSql() method, but it didn't show any SQL

how can i specify the migrations directory for typeorm CLI

After the new typeorm release a have some troubles to work with migrations. Some time ago i was using that code and it work entities: ['./src/modules/**/infra/t

How can I have IS NULL condition in TypeORM find options?

In my queries I'm using TypeORM find option. How can I have IS NULL condition in the where clause?

TypeORM find where clause, how to add where in multiple parameter

this.sampleRepo.find ( { where: { id: In ["1","7","13"] } order: {

TypeORM throws QueryFailedError Table already exists on MySQL when synchronize is true

I am using NestJS, TypeORM, and MySQL to build a web application. I am using a .env file to pass in some environment variables for connecting to my local datab

TypeORM migration results in PostgreSQL error

I am having an issue running migrations with TypeORM (with the intent of establishing my database for use in local development). In running a migration on the i

How can I mock nest typeorm database module in end to end (e2e) tests?

all. Include details about your goal: I'm trying to mock repository in e2e test Describe expected and actual results: Request to server will not have access

MongoDB find documents with a field not empty, IF EXISTS

I want to be able to query documents having a specific field's value not empty, if the field is present. Normally I'd do something like: client_comment: { '$exi