dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

Pool connection with postgres #825

Closed viico closed 4 years ago

viico commented 6 years ago

Hello,

I tried node-orm2 for the first time today. I think there is an issue on pool connection with pg driver from v7.0.

With newer version I have "TypeError: this.db.connect is not a function" error when trying to connect using pool connection. No error with "query: {pool: false}" option.

I downgraded pg driver version to 6.4.1 and it fixed the issue. But there is warning at connect: "DeprecationWarning: PG.connect is deprecated - please see the upgrade guide at https://node-postgres.com/guides/upgrading". The link explain how to resolve the connect issue.

I'll continue to discover your tools.

dxg commented 6 years ago

Yeah someone needs to add support for PG driver versions >= 7.0.

dxg commented 4 years ago

Seems I resolved this a while ago but forgot to mention that here. https://github.com/dresende/node-orm2/blob/master/Changelog.md#v500 https://github.com/dresende/node-orm2/pull/830