Julian
06/13/2022, 2:43 PMconst amountMale = await this._prismaService.$queryRaw`
	SELECT 
		COUNT(profile) as count
	FROM "public"."User" AS user, "public"."Profile" AS profile
	WHERE user.profileId = profile.id
	WHERE profile.gender = MALE
`Raw query failed. Code: `42601`. Message: `db error: ERROR: syntax error at or near "user"`AS userAS profileWHERE User.profileId = Profile.id.mans
06/13/2022, 3:00 PMmodel Product {
  id          Int      @id @default(autoincrement())
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
  name        String   @unique @db.VarChar(255)
  description String?
  price       Float
  published   Boolean  @default(true)
  // een relatie van alle orders met dit product erin
  orders      Order[]
}
model Order {
  id         Int       @id @default(autoincrement())
  clientName String
  email      String
  placedAt   DateTime  @default(now())
  status     Status    @default(PLACED)
  Products   Product[]
}Moin Akhter
06/13/2022, 6:32 PMprisma chobo
06/13/2022, 6:39 PMprisma.agent.findMany({
      where: {
        teamId: id,
        deletedAt: null (undefined)
      },
    });
my schema is like so
model Agent {
  id                    String            @id @default(auto()) @map("_id") @db.ObjectId
  teamId                String
  deletedAt             Int?
}
This always empty array whether deletedAt is set or deletedAt is null or undefined...prisma chobo
06/13/2022, 6:39 PMJack Wright
06/13/2022, 7:38 PMJack Wright
06/13/2022, 7:47 PMJack Wright
06/13/2022, 9:38 PMmodel User {
  id        Int     @id @default(autoincrement())
  firstname String
  lastname  String
  username  String  @unique
  email     String  @unique
  password  String
  tel       String?
  country   String?
  bio       String?
  mealIds   Meal[]
}
model Meal {
  id    Int    @id @default(autoincrement())
  name  String @unique
  about String
  Owner        User  @relation(fields: [ownerId, likedUserIds], references: id) <--- Prisma does not like this
  ownerId      Int
  likedUserIds Int[]
}Mehul Gogri
06/13/2022, 10:01 PMmatt murphy
06/14/2022, 10:49 AMTicketTicketTagmodel Ticket {
  id                String          @id @default(auto()) @map("_id") @db.ObjectId
  title             String
  editedAt          DateTime?
  createdAt         DateTime
  ticketTags        TicketTag[]        @relation(fields: [ticketTagIds], references: [id])
  ticketTagIds      String[]         @db.ObjectId
  user              User             @relation(fields: [userId], references: [id])
  userId            String           @db.ObjectId
}
model TicketTag {
  id                String          @id @default(auto()) @map("_id") @db.ObjectId
  title             String
  description       String?
  attributes        Json
  editedAt          DateTime?
  createdAt         DateTime
  tickets           Ticket[]        @relation(fields: [ticketIds], references: [id])
  ticketIds         String[]         @db.ObjectId
}ticketIdsTicketTagTicketticketTagIdsTicketTagMcKay Bonham
06/14/2022, 12:21 PM<mongodb://mongo_db_admin>:<password for mongo_db_admin>@127.0.0.1/<database name>?retryWrites=true&w=majority&ssl=trueMatthew Drooker
06/14/2022, 12:54 PMJulian
06/14/2022, 1:29 PMfirstNamelastNamestreethouseNumberJohn DoeJohn Doe Mainroad 15OR: []containsORANDGert
06/14/2022, 3:57 PMRahul Taing
06/14/2022, 4:02 PMerror TS2345: Argument of type '() => { __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to parameter of type 'MockModuleFactory<{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }>'.
      Type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; } & { ...; }'.
        Type '{ __esModule: boolean; default: { $on: CalledWithMock<void, ["beforeExit", (event: () => Promise<void>) => void]>; $connect: CalledWithMock<Promise<void>, []>; ... 8 more ...; readonly prismaExampleTable: any; } & PrismaClient<...>; }' is not assignable to type '{ __esModule: true; }'.
          Types of property '__esModule' are incompatible.
            Type 'boolean' is not assignable to type 'true'.Jack Pordi
06/14/2022, 4:14 PMbinaryTargetQuery engine library for current platform \"linux-musl\" could not be found.\nYou incorrectly pinned it to linux-musl\n\nThis probably happens, because you built Prisma Client on a different platform.binaryTargetnativelinux-muslGerma Vinsmoke
06/14/2022, 4:34 PMGerma Vinsmoke
06/14/2022, 4:51 PMMatias
06/14/2022, 4:59 PMAtharva Bhange
06/14/2022, 6:58 PMRUNnpx prisma generateError: Get config: Unable to establish a connection to query-engine-node-api librarynode:16-slimgenerator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native"]
}
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}lawjolla
06/14/2022, 7:27 PMfindManyconst getUser = await prisma.user.findMany({
  where: {
    id: { in: [22, 91, 14, 2, 5] },
  },
})const getUsers = (await Promise.all(ids.map(id => prisma.user.findUnique({ where: { id }})))e
06/14/2022, 8:50 PMe
06/14/2022, 8:51 PMtypePaths:
        process.env.NODE_ENV !== "production" || process.env.IS_OFFLINE
          ? ["**/*.graphql"]
          : ["*.graphql"],e
06/14/2022, 8:55 PM"errorMessage": "No type definitions were found with the specified file name patterns: \"*.graphql\".```Moin Akhter
06/14/2022, 11:37 PMGelo
06/15/2022, 2:25 AMIan Alexander Abac
06/15/2022, 3:33 AMOkan Yıldırım
06/15/2022, 8:16 AMBerian Chaiwa
06/15/2022, 9:52 AMPrismaClientKnownRequestErrorjson{code: "P2002",message:"some msg"}Joonatan
06/15/2022, 1:51 PMSELECT * FROM "Example" WHERE "date" > '2020-10-10'_let_ fromStr = dayjs(from).format("YYYY-MM-DD");