Skip to content

Conversation

@shimonbrandsdorfer
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 16e974d on shimonbrandsdorfer:master into 4421c1e on dsanel:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 770ab64 on shimonbrandsdorfer:master into 4421c1e on dsanel:master.

@dsanel
Copy link
Owner

dsanel commented Oct 30, 2017

Hi @shimonbrandsdorfer,

this PR looks very promising but I have several items:

  1. Why do we need this? Any specific reason?
"dependencies": {
   "mongoose": "4.x"
},
  1. Can you please provide simple README documentation and examples for new features (aggregate)?

  2. Can you use identical code formatting as we already use in code? Overall it is very good and clean, but I notice several wrong spaces, empty spaces...

@dsanel
Copy link
Owner

dsanel commented Nov 1, 2017

Please do not worry @shimonbrandsdorfer, this is not any big mistake or problem just small tricks how to keep module clean and in good shape. :)

You can just do all your changes in this branch and push it to GitHub.

@arthurRbr
Copy link

Just came across the same issue. Do you consider merging this fix?

Thanks

@gfviegas
Copy link

gfviegas commented Feb 4, 2019

Any update on this @dsanel ?

@menocomp
Copy link

any update on this? ^^^

@kenzdozz
Copy link

kenzdozz commented Mar 4, 2020

Hi @dsanel , what can be done for this to get merged??

@RsknCankov RsknCankov mentioned this pull request Apr 1, 2020
@RsknCankov
Copy link

RsknCankov commented Apr 1, 2020

Guys, I managed to fork with the changes from this PR and basically it seems implementation of overwriting aggregate not working. Executing following aggregation
aggregate([ {$project: {name: 1, deleted: 1}}, ]
resulting in
[ { _id: 5e847e4f9ef53316905cc0fa, deleted: true, name: 'Obi-Wan Kenobi' }, { _id: 5e847e4f9ef53316905cc0fb, deleted: false, name: 'Darth Vader' }, { _id: 5e847e4f9ef53316905cc0fc, deleted: false, name: 'Luke Skywalker' } ]

I am trying to figure out what is the problem, but it would be useful if someone give me a hand on that.
Cheers!

@dsanel
Copy link
Owner

dsanel commented Apr 1, 2020

Hello, everyone! I was very busy the last several months, didn't be able to spend some good time on this. I want to inform you that we have a new 0.5.2 version of this plugin with support for the aggregate override.

I reuse some code from this PR and some extra code and features too. Now we will be able to use a pipeline builder too.

        TestModel.aggregate([
            {
                $project : { name : 1 }
            }
        ], function (err, documents) {
            should.not.exist(err);
            documents.length.should.equal(1);
            done();
        });

or this way

        TestModel
            .aggregate()
            .project({ name : 1 })
            .exec(function (err, documents) {
                should.not.exist(err);
                documents.length.should.equal(1);
                done();
            });

        TestModel
          .aggregateDeleted()
          .project({ name : 1 })
          .exec(function (err, documents) {
              should.not.exist(err);
              documents.length.should.equal(2);
              done();
          });

Anyway, I want to tanks to @shimonbrandsdorfer for his first commit related to this feature. And everyone else for all other support and comments.

@dsanel
Copy link
Owner

dsanel commented Apr 1, 2020

79d7f61

@dsanel dsanel closed this Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants