Comments (5)
I'm confused too. Can you post an example?
from node-orm2.
Please give me some feedback, some versions of postgres, node, ...
from node-orm2.
Found the issue and partially solved it.
The initial connection string:
postgresql://user:pass@localhost:5432/db_name
When I used it in orm.connect, I put a breakpoint at the point where ORM converts the string to an object of options. The following opts object was generated:
{
auth: "user:pass",
database: "db_name",
host: "localhost:5432",
hostname: "localhost",
href: "postgresql://user:pass@localhost:5432/db_name",
password: "pass",
path: "/db_name",
pathname: "/db_name",
port: "5432",
protocol: "postgresql:",
query: {},
search: "",
slashes: true,
user: "user"
}
Instead of a connection url string, I created an options object with this data, and used it in orm.connect. It blew up with the same error.
Then, I changed host: "localhost:5432" with host: "localhost:", and it started working!
Postgres ver: 9.1
Node ver: 0.8.5
npm ver: 1.1.46
from node-orm2.
So the problem is the port definition? Hmmm... I have to check that..
from node-orm2.
Could you try the latest commit? I change the way drivers use the config. More specifically, mysql and postgres will try to use the url string before trying the parsed object.
from node-orm2.
Related Issues (20)
- About timezone setting in sqlite HOT 1
- user or conditions HOT 1
- Adding a column to a table? HOT 2
- Missing primary key value after create
- Pool connection with postgres HOT 2
- only in findAsync options doesn't seem to do anything HOT 2
- Bad integration with EJS HOT 3
- OtherInstance.save is not a function [hasOne Association]
- Validations not working? HOT 1
- Cannot read property 'mapsTo' of undefined HOT 3
- groupBy is not working with findAsync HOT 1
- Something went wrong?
- Group by Month?
- Callback not working !
- Stored procedure and custom sql statement support for MySql HOT 1
- Need to update node-sql-ddl-sync once lodash is updated there HOT 1
- ORM Support for MySQL v8.x HOT 1
- IF condition
- findBySmth has doubles
- How to change to a synchronous query? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-orm2.