I have a few views in my Mongo db and got an error...
# mongodb
c
I have a few views in my Mongo db and got an error
Error in connector: Error querying the database: Command failed (CommandNotSupportedOnView): Namespace db.viewName is a view, not a collection)
when I ran
db pull
. I'm guessing introspecting a db with views may not be supported yet, but I wanted to see what was recommended to get around the error in the interim. I'm assuming I'll need to build the schema manually but thought I'd check first.
j
Step 1: Open an issue for View support on MongoDB, or a comment on an existing "View" feature requests so we are ware. Step 2: Find a workaround...
... which is probably indeed to build the schema manually and then just call it a "model" (for a collection) in the Prisma schema. That will most probably work.
Actually, Step 1 could be to open a bug report - because even when we do not support this, we should definitely not crash!