Questions tagged [sails-orientdb]

OrientDB adapter for Sails.js / Waterline ORM.

sails-orientdb allows connecting to OrientDB from sails.js using the waterline ORM API.

26 questions
54
votes
2 answers

SELECT and UPDATE multiple records in oriento / orientjs and transaction in waterline

How can I select or update multiple records in oriento? Like in waterline we can offersModel.update({id:items_ids,status:INACTIVE},{status:ACTIVE}) But in waterline transaction is not available. So I want to use : var db =…
9me
  • 1,078
  • 10
  • 36
14
votes
4 answers

Select specific fields from database

I just want to know that is it possible to select specific fields using waterline, orientdb query is given below. e.g. select phone from user I want to select phone from user vertices by using this…
Zeeshan
  • 375
  • 1
  • 3
  • 17
3
votes
0 answers

Error (E_VALIDATION) :: 1 attribute is invalid

I'm trying to update one line using sails-orientdb, this way: CommentModel.update({ _id: req.body.reply.commentId }, comment).exec(function (err, reply) { // *** LOG: LOOK BELOW console.log(comment,…
John Aims
  • 49
  • 7
3
votes
1 answer

Generating schema with waterline-orientdb

In many of the previous Waterline databases that I've hacked around with, you could create a Waterline/Sails model using the "generic" syntax specified by Waterline/Sails and things would just work. When I started using OrientDB and…
AfroRick
  • 610
  • 5
  • 17
2
votes
1 answer

Sails Js populate with conditions

I'm trying to multiple populate in sails js using sails-hook-deep-orm. I want to filter the province id. I am using the latest version of Sails and Node. And I using MySQL for database. This is my model : // Province.js attributes: { name: { …
Luthfi Arifin
  • 21
  • 1
  • 2
2
votes
1 answer

Waterline orientdb database connections timing out

With SailsJS/Waterline I am using the waterline-orientdb adapter to connect to and commit my domain objects to OrientDB. Everything with that is fairly straightforward except for the frequent connection timeouts that I'm getting from the…
AfroRick
  • 610
  • 5
  • 17
2
votes
2 answers

TypeError: Cannot call method 'then' of undefined

I have the following code executing inside a controller in Sailsjs. The underlying adapter is sails-orientdb. I get the following error back TypeError: Cannot call method 'then' of undefined Why is this error occurring? User.query("select id…
TommyK
  • 416
  • 2
  • 6
  • 24
2
votes
1 answer

Waterline-OrientDB - Bi-Directional Edge

I have two models declared in Sails and I'm using the Waterline-Orientdb adapter and don't know how to connect them via a bi-directional edge Questions Model var Waterline = require('waterline'); module.exports = Waterline.Collection.extend({ …
TommyK
  • 416
  • 2
  • 6
  • 24
1
vote
1 answer

Sails OrientDB update error

I'm going through this sails tutorial by irl nathan and got to a point where I wanted to try and use the sails-orientdb adaptor (episode 10). I resolved the basic issues with the '#' in orientdb id's but I'm getting an error when executing an…
Walter Sung
  • 140
  • 9
1
vote
1 answer

How to restrict http request type in sails.js?

In sailsjs blueprint api,By default, action route responds to all four types of requests - GET, POST, PUT, DELETE. I would like to deny only certain types of request to a route, while allowing the others to go through. For example, I may wish to…
Gautam Bhalla
  • 1,170
  • 2
  • 10
  • 16
1
vote
1 answer

Orientdb fetch plan returning ID instead of record

I am querying a class from the Sails-orientdb adapter for Sailjs. I expect to see last_comment field expanded but it just gives me back the ID. In orientdb studio the same SQL below shows the last_comment expanded Questions.query("select * from…
TommyK
  • 416
  • 2
  • 6
  • 24
1
vote
1 answer

Sails + sails-orientdb one-to-many and one-to-one associations

I am rather new to Sails and have been having difficulties with mapping my model associations to OrientDB. I have 3 models: //User.js module.exports = { attributes: { id: { type: 'string', primaryKey: true, columnName: '@rid' }, name :…
1
vote
0 answers

Sails-OrientDB LinkedList Type

Im using Sails-Orientdb and looking to have LinkedList OrientDB type instead of an EmbeddedList I am defining it like below experience: { type: 'array' } Is there any way to make the array type become LinkedList?
TommyK
  • 416
  • 2
  • 6
  • 24
1
vote
0 answers

How to rollback with sails-orientdb?

I am a newbie at sails-orientdb. I want to implement transaction via sails-orientdb. But currently, I don't know how to rollback my query when it's get some errors. I've read this article before, Transaction in orientdb and waterline. But it's not…
1
vote
1 answer

Check if database with specified name exists or not

As you may know that whenever we set a new database inside "sails-orientdb adapter" configurations it creates database, now on the creation time of the database of course database will be created if there is no database inside orientdb with this…
Zeeshan
  • 375
  • 1
  • 3
  • 17
1
2