Questions tagged [node-orm2]

An Object Relation Mapping for node.js

node-orm2 is an Object Relational Mapping for node.js. It maps Javascript objects to persistent storage and is usually used with a relational database such as MySQL.

64 questions
10
votes
1 answer

Node orm2: orm.connect callback is not called

I would like to try out node orm2, with sqlite. I tried the example code, and changed mysql to sqlite. It looks like this: var orm = require("orm"); orm.connect('sqlite://D:/orm_test/database.db', function (err, db) { // ... }); I don't get…
Iter Ator
  • 8,226
  • 20
  • 73
  • 164
8
votes
1 answer

Redshift - unsupported type "serial" for auto increment id with node-orm-2

Any insight on how to get an auto increment id working? From my understanding, an id column is added by default; however, because I'm using Redshift, the default "serial" type won't work as it is not supported. { [error: Column "probe.id" has…
Nick Parsons
  • 8,377
  • 13
  • 48
  • 70
5
votes
2 answers

Node.js options for MySQL ORM

I want to create a node.js and MySQL based application. Google and Stack Overflow give many options for Javascript ORMs: sequelize.js persistence.js waterline knex.js node-orm2 bookshelf.js objection.js However, I could not find an perfect ORM…
ohm
  • 140
  • 1
  • 5
4
votes
4 answers

Node.js ORM mysql connect via SSH tunnel

I'm trying to set up a node.js application which uses node-orm2. However our cloud hosted DB can only be connected via SSH tunnel. Checking the ORM doc I can not see any config option to connect to the DB via SSH tunnel. Is there any way to set up…
Zoltan Magyar
  • 874
  • 1
  • 6
  • 19
3
votes
1 answer

ORMError NO_SUPPORT: Connection protocol not supported - have you installed the database driver for postgres?

I'm trying to deploy a nodejs application on ubuntu 13.10. I have tested it on my local mac( working good). But when I try to run it on my ubuntu server, i got this: [ORMError NO_SUPPORT: Connection protocol not supported - have you installed the…
Yunwei.W
  • 1,589
  • 1
  • 14
  • 31
3
votes
1 answer

node-orm2 instance lacks save method

I'm new to using node-orm2 and am getting caught by the following issue; TypeError: Object [object Object] has no method 'save' Full stack trace http://pastebin.com/cb9Lt9pB This error is coming from within a Model method, definition…
Tim Reynolds
  • 421
  • 2
  • 14
2
votes
1 answer

Why is the order in the Setup so hard?

I build an node express app based off the node-orm2 example project which is included in the library. I had an nasty 'bug' where my return value looked messed up. An "User" has only one "Permission": User.hasOne('permission', db.models.permission,…
Lex van Buiten
  • 138
  • 1
  • 8
2
votes
1 answer

Nodejs ORM for Postgers spatial indexes (like PostGIS)

Postgres is the DB of choice due to its spatial indexing goodness (top-k-closest-points) using PostGIS or other gists. Looks like Node.js ORMs do not directly support spatial indexing, so which one requires the least amount of hacking for this?…
Morteza Shahriari Nia
  • 1,392
  • 18
  • 24
2
votes
1 answer

Is there a way to call the each function in synchronous way in node-orm?

I'm having a problem with node-orm2's asynchronous behavior. I have a query like this: req.models.posts .find(...) .order('-whatever') .each(doMagic) //Problem happens here .filter(function(post) { ... }) .get(callback); function…
William Barbosa
  • 4,936
  • 2
  • 19
  • 37
2
votes
1 answer

How to use logical OR operator in node-orm2 for finding records from database?

I am working on the Node ORM. I want to find the records based on logical OR condition.
Parag Kuhikar
  • 485
  • 2
  • 6
  • 17
2
votes
1 answer

Node Orm2 transaction plugin

I'm seeming to have issues with how to use the transaction plugin (with postgresql) with node orm2. I think I am misunderstanding how transactions work with async function calls. Here is an example of my code: function(row){ …
mathmonkey
  • 335
  • 4
  • 15
2
votes
2 answers

Node.js orm2 - trouble retrieving new associations in OneToMany relationship

I'm playing with node-orm2 to get a feel for what it's like to use in a RESTful API. I'm using a Postgres database on the backend. I'm trying a variation on their docs where I have a OneToMany relationship between a Person and a Task with the…
user1539426
2
votes
1 answer

Chaining models relations in node.js (node-orm) like in Rails

I'm building a relatively big NodeJS application, and I'm currently trying to figure out how to fetch the data I need from the DB. Here is a part of my models : One user has one role, which has access to many modules (where there's a table…
Samuel Bolduc
  • 18,163
  • 7
  • 34
  • 55
2
votes
1 answer

REFERENCE KEY in node-orm2

I am working on REST API based on node.js and i chose postgresql database to store data. Suppose that this database has two tables names User and Comment. Any Comment belongs to One User and when we decide to remove an User, the Comment's of him/her…
Hossein Mobasher
  • 4,382
  • 5
  • 46
  • 73
1
vote
1 answer

Node/npm: ORM library like Mongoose for BigQuery

I am working on a Nodejs application, where data source had been migrated to BigQuery from MongoDb. We are using mongoose as a ORM library to define Schema for all Entity Tables in current system. Is there any library module for BigQuery to achieve…
kn_pavan
  • 1,510
  • 3
  • 21
  • 42
1
2 3 4 5