RESTful Mongoose with ObjectID Links

My question is: How can I create an instance of a RESTful mongodb that uses mongoosejs without a million HTTP requests?

My installation: I am using NodeJS for the backend with MongooseJS . I use AngularJS on the interface, so I decided to use angular-bridge to restore the MongoDB database .

My schemes: I have the following scheme:

Schemas

: , (, comment owningPost, ObjectID > ). , (*) "", , , , , .

:. , , . :

  • ,
  • ,

. , , , . , ( ).

, , :

data: {
  bucket: {},
  user: {},
  posts: [
    {
      post: {},
      comments: [
        user: {},
        comment: {}
      ]
    }
  ]
}

... ? .

? ?

+3
3

:

  • "".
  • objectId "show".

RESTful, . - , . , .

, . . , , HTTP 1.1, . , JSON .

"".

, !

+2

, , REST. , , , . - .

, . post id . . , , .

+1

You have to denormalize your circuit

0
source

All Articles