node-ottoman icon indicating copy to clipboard operation
node-ottoman copied to clipboard

How do I interact with views?

Open danhab99 opened this issue 3 years ago • 1 comments

I'm migrating a project from MongoDB+Mongoose to CouchDB+Ottoman but there are some features I'm not sure if are missing.

  • I have a post model and a comment models that include the ID of a post. In mongoose I defined a virtual field to count these comments. I know CouchDB has views just like any database but I can't figure out how to interact with them through Ottoman. Any guides or documentation?

  • I also use virtual fields to populate a posts comments but I can't find any mention of "populating" in the Ottoman docs. Can we do cross-schema populating with Ottoman the same way as I did with Mongoose?

danhab99 avatar Nov 20 '21 20:11 danhab99

Hello @danhab99 sorry for the delayed response.

AV25242 avatar Dec 01 '21 17:12 AV25242