Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB builder.join is not working #3

Open
aalfiann opened this issue Sep 11, 2019 · 0 comments
Open

MongoDB builder.join is not working #3

aalfiann opened this issue Sep 11, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@aalfiann
Copy link

I've tried with mongodb version 3.6.14 and 4.2.0, join is not working.

What I have tried

    // Select all with join ver.1 FAILED
    db.find('data_user').make(function(builder){
        builder.join('id','data_user_profile')
            .on('id','id')
            .callback((err,response,count) => {
                console.log(response);
            });
    });

    // Select all with join ver.2 FAILED
    var user = db.find('data_user');
    var profile = user.join('id','data_user_profile')
            .on('id','id')
            .callback((err,response,count) => {
                console.log(response);
            });

Error info is same like this:

======= 2019-09-11 11:30:49: TypeError: client.$dbms._join is not a function TypeError: client.$dbms._join is not a function
    at /home/aziz/Work/nodejs/total-mongodb/node_modules/dbms/mongo.js:52:17
    at result (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/operations/execute_operation.js:75:17)
    at executeCallback (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/operations/execute_operation.js:68:9)
    at handleCallback (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/utils.js:129:55)
    at cursor.close (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/operations/to_array.js:36:13)
    at handleCallback (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/utils.js:129:55)
    at completeClose (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/cursor.js:859:16)
    at Cursor.close (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/cursor.js:878:12)
    at cursor._next (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/operations/to_array.js:35:25)
    at handleCallback (/home/aziz/Work/nodejs/total-mongodb/node_modules/mongodb/lib/core/cursor.js:32:5)

Note:

  • I make test join in same database.
  • data_user is in mongodb.
  • data_user_profile is also in same mongodb.
  • For mongodb version 4, there is DeprecationWarning, but I know if mongodb driver is not update yet.
@petersirka petersirka added the bug Something isn't working label Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants