Coder Social home page Coder Social logo

mongoose-multi's People

Contributors

felixfurtmayr avatar gofreddo avatar hatzavw avatar rf-alex avatar rf-bernhard avatar web-mi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mongoose-multi's Issues

createConnection warning

The file index.js line 105:
connections[name] = mongoose.createConnection(url, options);
Causing the following warning:
the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,keepAliveInitialDelay,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,checkServerIdentity,validateOptions,appname,auth,user,password,authMechanism,compression,fsync,readPreferenceTags,numberOfRetries,auto_reconnect,minSize,monitorCommands,retryWrites]

In order to fix we need to update the server in the options (move it to top level).

Node 8.9.4
NPM 5.6.0

When the collections start in capital letters, they are not returned any data

if my collection is Settings dont work and if is settings works OK,

schema.js WORKS OK!

module.exports = {
    settings: new Schema( { // collection
        options: {type: Array, required: false},
   })
}

->db.app.settings.find({}).exec((err, data))  DATA has value
in mongodb collection name is **settings**

schema.js DOESN`T WORK

module.exports = {
   Settings: new Schema( { // collection
        options: {type: Array, required: false},
   })
}
->db.app.Settings.find({}).exec((err, data))  DATA is empty
in mongodb collection name is **Settings**

closing connections causes delay

I have 2 connections and when I disconnect I get the following message and a long pause before I get the shutting down message. How can I close the connections and shutdown immediately?

[mongoose-multi] DB local disconnected, mongodb://*******************************************
[mongoose-multi] DB global disconnected, mongodb://********************************************

........(long pause...)

[mongoose-multi] shutting down application for restart: Try to reconnet DB.

embedded documents throwing some strange error

Hi,
I am getting this error when I have embedded documents.
Screen Shot 2022-02-27 at 11 39 41 AM

my schema file looks like this where I have a labelSchema and customerSchema has a field which is array of labelSchema:
Screen Shot 2022-02-27 at 11 41 39 AM

when I try to create a document of type customer in application database I get the error above,
this has something to do with embedded schema for embedded docs, if I just defined the CustomerSchema with labels as nested path instead

Screen Shot 2022-02-27 at 11 42 47 AM

it works,

code to try to create a customer document is this:
Screen Shot 2022-02-27 at 11 43 47 AM

DeprecationWarning: current URL string parser is deprecated

Hi! I get this simple warning knowing (I think) for all of us:

(node:30216) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

I cant find any solution for this warning. Can anyone help with this?

Thanks.

Versions:
"mongoose": "^5.3.1"
"mongoose-multi": "^0.4.2"

Other dependecies:
"ini": "^1.3.5",
"uuid": "^3.3.2",
"ws": "^6.0.0"

TypeError: Cannot read property 'application' of undefined

I am trying to run mongoose-multi\example\production this example then i am getting below error

D:\Demos\multimongoose1>node example.js
D:\Demos\multimongoose1\node_modules\mongoose-multi\index.js:85 startConnection(conName, url, schemaFile[conName], options);

^ TypeError: Cannot read property 'application' of undefined at Object.module.exports.start (D:\Demos\multimongoose1\node_modules\mongoose-multi\index.js:85:47) at Object.<anonymous> (D:\Demos\multimongoose1\example.js:20:24) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Function.Module.runMain (internal/modules/cjs/loader.js:741:12) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

getting log.critical is not a function

     log.critical('tried extract schemas, please Check your Schema folder, an error occured: ' + error);
         ^

TypeError: log.critical is not a function
at Object.module.exports.start (/hassan/webapps/dizio/dizio-node/node_modules/mongoose-multi/index.js:63:14)
at Object. (/hassan/webapps/dizio/dizio-node/scripts/multidbtest.js:6:22)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

Mongoose warning

Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.