for mongodb, it returns null when i query like so:...
# orm-help
p
for mongodb, it returns null when i query like so:
Copy code
prisma.item.findFirst({
 where: {
  id: "....",
  deletedAt: null,
 }
})
But if I remove deletedAt, I get what I want. Am I approaching in wrong way? My schema is
Copy code
model Item {
  id                      String            @id @default(auto()) @map("_id") @db.ObjectId
  name                    String
  type                    String?
  extendedName            String
  provider                String?
  summary                 String?
  destinationCountry      Country
  description             String
  remark                  String?
  amount                  Float
  gpoint                  Float?
  gpointAmount            Float?
  display                 Boolean
  discountRate            Int?
  notes                   Note[]
  imageUrl                String
  state                   State
  createdBy               String
  expiresAt               Int
  brand                   String
  category                String            
  order                   Order?
  createdAt               DateTime          @default(now())
  updatedAt               DateTime          @default(now())
  deletedAt               Int?

  @@index([category])
  @@index([brand])
  @@index([name])
  @@index([provider])
}
n
What’s the value of deletedAt in the record which you are trying to query?