2

I'd love to collect/see any code examples or links to such using ExpressJS & Mongoose that show Schema embedding, saving/updating with DBRefs. Simple usecase:

Comments on a Blog Post with DBRefs to Users in the Blog Post and Each Comment, showing saving/updating, and maybe as an extra treat: getters, setters, and a virtual or 2 tallying total comments or something

4

2 に答える 2

3

これに関する問題が公開されています: https://github.com/LearnBoost/mongoose/issues#issue/188

于 2011-02-25T12:42:58.400 に答える
1

https://github.com/jspears/mojabahttps://github.com/jspears/mersを ご覧ください。

Mers は、expressjs フレームワークで Mongoose スキーマを JSON/REST として公開し、Mojaba は mongoose スキーマの CRUD 操作を作成します。私は mojaba をエクスプレス プラグインにする作業を行っているので、スキーマを追加するだけで完全に機能する crud が得られますが、まだ完成していません。

少し荒いですが、うまくいくはずです。

于 2012-03-13T18:34:04.667 に答える