Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
¿Cómo seleccionar con condiciones en relación en TypeORM?

Quiero encontrar una fila en Amistad, donde amistad.amigos tienen usuarios con identificaciones iguales a las dadas. ¿Cómo puedo hacerlo a través del Repositorio y QueryBuilder?

Entidades:

 import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm"; import { UserToFriendship } from "./userToFriendship.entity"; @Entity() export class Friendship { @PrimaryGeneratedColumn() id: number @OneToMany(() => UserToFriendship, u => u.friendship, { eager: true }) friends: UserToFriendship[] @Column({ default: false }) accepted: boolean } import { User } from "src/users/entities/user.entity"; import { Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm"; import { Friendship } from "./friendship.entity"; @Entity() export class UserToFriendship { @PrimaryGeneratedColumn() id: number; @ManyToOne(() => User, user => user.friendships) user: User; @ManyToOne(() => Friendship, friendship => friendship.friends) friendship: Friendship; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!