{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientjs/issues/169","repository_url":"https://api.github.com/repos/orientechnologies/orientjs","labels_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/169/comments","events_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/169/events","html_url":"https://github.com/orientechnologies/orientjs/issues/169","id":149903177,"number":169,"title":"Best practice to handle lots of connection to multiple databases","user":{"login":"StarpTech","id":1764424,"avatar_url":"https://avatars.githubusercontent.com/u/1764424?v=3","gravatar_id":"","url":"https://api.github.com/users/StarpTech","html_url":"https://github.com/StarpTech","followers_url":"https://api.github.com/users/StarpTech/followers","following_url":"https://api.github.com/users/StarpTech/following{/other_user}","gists_url":"https://api.github.com/users/StarpTech/gists{/gist_id}","starred_url":"https://api.github.com/users/StarpTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StarpTech/subscriptions","organizations_url":"https://api.github.com/users/StarpTech/orgs","repos_url":"https://api.github.com/users/StarpTech/repos","events_url":"https://api.github.com/users/StarpTech/events{/privacy}","received_events_url":"https://api.github.com/users/StarpTech/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientjs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2016-04-20T22:20:27Z","updated_at":"2016-04-26T13:15:04Z","closed_at":null,"body":"Hi, what is the best approach to connect with multiple databases? e.g if you want to build a multi-tenancy architecture which is database-based.\r\n\r\nShould I use ODatabase to initialiaze a connection `new ODatabase({ name: <tenant>, ... })`\r\nShoud I use `db.use(<tenant>)`\r\nor what is the recommend way? Can give me an example of how to use the connection pool with multiple databses?"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientjs/issues/comments/214737012","html_url":"https://github.com/orientechnologies/orientjs/issues/169#issuecomment-214737012","issue_url":"https://api.github.com/repos/orientechnologies/orientjs/issues/169","id":214737012,"user":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T13:15:04Z","updated_at":"2016-04-26T13:15:04Z","body":"hi @StarpTech \r\n\r\nit means that the pool is binded to one databases. You could create a pool for each database \r\nLet me check if i we can use some solution  JWT. "}}