Questions tagged [sails-postgresql]

A Waterline adapter for PostgreSQL. May be used in a Sails app or anything using Waterline for the ORM.

106 questions
0
votes
1 answer

how to create a column with datatype 'TimeStampWithTimezone' in sails.js v1.0.2 models?

I'm using sails v 1.0.2 and sails-PostgreSQL adapter. I have a model that has a column of date type that saves current time in the format of timestamp with time zone. how should I do it? previously I created my database in pgAdmin statically but now…
fariba.j
  • 1,737
  • 7
  • 23
  • 42
0
votes
1 answer

Sails.js: Could not populate model because of ambiguous usage

I'm having two models of let's say A and B. It's an 1:n relation, where one A owns one B, and B can be owned my multiple As. Now, if possible, B shouldn't have to know about all the As it's referenced in, so I'm only associating on the A side. Now I…
Philip Feldmann
  • 7,887
  • 6
  • 41
  • 65
0
votes
1 answer

Connecting to a postgresql database with Sails 1.0.0?

I just decided to upgrade an existing Sails project to 1.0.0 and managed to get through most of the upgrade process until I tried connecting to the database. When attempting to lift this is the error I receive: The adapter used by the default…
mtpeoples
  • 37
  • 5
0
votes
0 answers

error: A hook (`orm`) failed to load when lifting sails app using postgres

So I get this 2 error: error: A hook (orm) failed to load! error: error: password authentication failed for user "root" This is my connections.js file: module.exports.connections = { PostgresqlServer: { adapter: 'sails-postgresql', …
Ali SALEM
  • 1
  • 3
0
votes
1 answer

Sails JS - Nested .query method doesn't run sequence

I beginner in Sails JS. I try to make multiple .query("SELECT ... "). I have a problem when looks like it not run sequence. I will explain my problem, look to My snippet code : var isSuccess = true; for(var loc = 0 ; loc < decode.length ; loc++){ …
Mr. Mike
  • 453
  • 5
  • 23
0
votes
1 answer

SailsJS - Error occurred connecting to multiple database: error: syntax error at or near "SELEC"

I have MongoDB used in my application, now I need to connect to Postgresql to get some other data. But after I add connection and model for Postgresql, there's an error occurred when I started the application with sails lift. Following are the whole…
Sky
  • 7,343
  • 8
  • 31
  • 42
0
votes
2 answers

sails-postgresql "ReferenceError: User is not defined"

I try to set up postgresql connection with sails.js . Here is my config: api/models/User.js: module.exports = { tableName: 'user', meta: { schemaName: 'public' }, identity:'sails', connection: 'postgreSQL', attributes: { username:{ …
0
votes
1 answer

Sails.js one to many association with postgreSQL: column does not exist

I need some help with associations in sails 0.12.13 with postgresql. I have an "App" model and a "Membership" model. Relation should be one to many (one app can be associated with many relationships). This is the App model db table schema (table is…
whites11
  • 12,008
  • 3
  • 36
  • 53
0
votes
1 answer

SailsJS populate html table with each

I cant retrieve model data to a html select tag. Heres my code so far. % _.each(users, function(user){ %>