Victor Meireles
01/02/2022, 6:09 PMVictor Meireles
01/02/2022, 6:55 PMJonathan Gamble
01/02/2022, 9:14 PMezeikel
01/02/2022, 10:52 PMUncheckedCreatePaymentUncheckedCreateWithoutPeriodInputPaymentPeriodNeo Lambada
01/03/2022, 8:27 AMmodel User {
  id             Int            @id @default(autoincrement())
  createdAt      DateTime       @default(now()) @db.DateTime(0)
  updatedAt      DateTime       @default(now()) @db.DateTime(0)
  //relationships
  followedBy     FollowUser[]   @relation("follower")
  following      FollowUser[]   @relation("following")
}
model FollowUser {
  id          Int      @id @default(autoincrement())
  followerId  Int
  followingId Int
  createdAt   DateTime @default(now()) @db.DateTime(0)
  updatedAt   DateTime @default(now()) @db.DateTime(0)
  //relationships
  follower    User     @relation("follower", fields: [followerId], references: [id])
  following   User     @relation("following", fields: [followingId], references: [id])
  // @@id([followerId, followingId])
}Neo Lambada
01/03/2022, 8:28 AMNeo Lambada
01/03/2022, 8:28 AMconst user = await prisma.user.findMany({
          where: {
            id: 46,
          },
          include: {
            followers: true,
          },
          take: args.limit || undefined,
          skip: args.offset || undefined,
        })  This gives me the user with his followers as an array. can all the followers for a given user be retrieved?Maxence Lecanu
01/03/2022, 9:16 AMArshath
01/03/2022, 10:11 AMPrisma is not InitializedIgnace Mella
01/03/2022, 11:40 AMDaniell
01/03/2022, 2:51 PMezeikel
01/03/2022, 10:15 PM.update()subscriberssubscribersidRobert Fish
01/04/2022, 4:07 AMVilke
01/04/2022, 6:51 AMobjectVilke
01/04/2022, 6:53 AMVilke
01/04/2022, 6:54 AMToru Eguchi
01/04/2022, 10:19 AMmodel User {
  id         Int       @id @default(autoincrement())
  name       String?
  children   FamilyRelation[] @relation("child")
  parents    FamilyRelation[] @relation("parent")
}
model FamilyRelation {
  child    User @relation("child", fields: [childId], references: [id])
  childId  Int
  parent   User @relation("parent", fields: [parentId], references: [id])
  parentId Int
  @@id([parentId, childId])
}user
id | name   | parent_user_id | child_user_id
1  | "John" | []             | [2, 4]
2  | "A"    | [1]            | []
3  | "B"    | [4]            | []
4  | "C"    | [1]            | [4]
5  | "D"    | []             | []
→ query result should be "A", "B", "C".Astral Gaming
01/04/2022, 1:32 PMDaniel
01/04/2022, 2:23 PMStatement Mode: Most aggressive method. This is transaction pooling with a twist: Multi-statement transactions are disallowed. This is meant to enforce "autocommit" mode on the client, mostly targeted at PL/Proxy.Demian N
01/04/2022, 4:50 PMChris Tsongas
01/04/2022, 5:57 PMts-node<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb00d90 node::Abort() [/app/.heroku/node/bin/node]
 2: 0xa1823b node::FatalError(char const*, char const*) [/app/.heroku/node/bin/node]
 3: 0xcedbce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
 4: 0xcedf47 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
 5: 0xea6105  [/app/.heroku/node/bin/node]
 6: 0xea6be6  [/app/.heroku/node/bin/node]
 7: 0xeb4b1e  [/app/.heroku/node/bin/node]
 8: 0xeb5560 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/app/.heroku/node/bin/node]
 9: 0xeb84de v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
10: 0xe7990a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/app/.heroku/node/bin/node]
11: 0x11f2f06 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/app/.heroku/node/bin/node]
12: 0x15e7819  [/app/.heroku/node/bin/node]
Aborted
error Command failed with exit code 134.Chris Tsongas
01/04/2022, 8:22 PMts-nodenodets-nodeShmuel
01/04/2022, 8:23 PMawait prisma.role.update({
    where: { id: 1 },
    data: {
      users: {
        create: [
            { user: { connect: { id: 1 } } },
            { user: { connect: { id: 2 } } },
            { user: { connect: { id: 3 } } },
        ]
      }
    }
  })await prisma.role.update({
      where: { id: 1 },
      data: {
        users: {
          deleteMany: [
           { user_id: 1 },
           { user_id: 2 },
           { user_id: 3 },
         ]
        }
      }
    })disconnectLuke Morris
01/04/2022, 9:38 PMLuke Morris
01/04/2022, 9:38 PMLuke Morris
01/04/2022, 9:44 PMburaks
01/04/2022, 10:26 PMFranco Roura
01/05/2022, 12:01 AMprimsa migrate deploy/api/health_checkuser
01/05/2022, 8:00 AM