Hi, so going through the documentation of prisma v...
# orm-help
p
Hi, so going through the documentation of prisma v1.34 I noticed that an OR operator is not supported for mongo DB so I thought about doing a raw query but that too seems to not be supported. Is the only solution to this really to query twice and combine the two queries before returning? That wouldn’t be the end of the world if it was temporary… are there any changes coming soon to prisma 1.34 or prisma 2 in regards to mongo DB? Thoughts and advice would be appreciated.
r
Hey @Philipp Rajah Moura Srivastava 👋 Unfortunately you would need to perform 2 queries in this case. There would be no new additions to Prisma 1, but this will be taken care of in Prisma 2 when MongoDB support is provided. Another alternative would be using mongoose for this specific use case and make a raw query.
p
So a raw query would be possible? Could you direct me to a resource that has some examples. The prisma 1.34 docs said there are not yet raw queries so I’ve been having trouble with that.
Can’t wait for prisma 2 and mongodb!
r
I think you misunderstood. A raw query with mongoose would be required in this case. Prisma 1 doesn't support that 🙂
p
Oh ok cool so I wouldn’t go through prisma? Is there a way to query the db directly? Not through prisma?
r
Yeah. Directly either through the MongoDB adapter or Mongoose