كيفية الاستعلام بواسطة الكائن في NestJs

المرجع:
https://stackoverflow.com/questions/69312033/make-joined-query-with-or-in-where-clause-in-typeorm-with-repository-method



الكود:

  //Get By Post
  //https://stackoverflow.com/questions/69312033/make-joined-query-with-or-in-where-clause-in-typeorm-with-repository-method
  findByClassification(classification: any): Promise<Asset[]> {
    return this.assetRepository.find({
      where: {
        classification: {id: classification.id} //LessThan(5) In([0, 5])
      },
      order: {
        id: "DESC"
      }
    });
  }

تعليقات

المشاركات الشائعة من هذه المدونة

ngx-extended-pdf-viewer

how to getting access token for https://fcm.googleapis.com/v1/projects/al-ayahya-co/messages:send for angular and backend nestjs

طريقة تفعيل زر Inline Keyboard في Telegram Bot