Jake W
09/25/2022, 12:27 AMmodel Guild {
id String @id @default(auto()) @map("_id") @db.ObjectId
guildId String @unique
modules Modules
users Member[]
}
model Member {
id String @id @default(auto()) @map("_id") @db.ObjectId
rblxId Int @default(0)
xp Int @default(0)
userId String @default("0")
medalIDs String[] @db.ObjectId
medals Medal[] @relation(fields: [medalIDs], references: [id])
guildId String
Guild Guild @relation(fields: [guildId], references: [id])
}
Jake W
09/25/2022, 12:29 AMguildId
? and by that, i mean the string defined in the schema in both models. when i try to query it, it somehow errors and is defined as an object id.Nurul
09/27/2022, 11:28 AMJake W
09/27/2022, 11:31 AMNurul
09/30/2022, 12:19 PM