waterline Questions
2
Solved
I'd like to add a default toDisplay function to all models which will use metadata, not unlike attribute/association definitions, to perform manipulations on the instance's attributes/associations ...
Behah asked 18/12, 2014 at 3:8
5
Solved
I'm looking to use the sails attribute type 'array' in my app, but I can't find documentation for this anywhere.
I'd like to do the following:
module.exports = {
attributes : {
images: {
type:...
3
Solved
How can I write a NOT Equal condition in Waterline?
This code:
Users
.count()
.where({
id: { '!=': req.params.id},
lastname: req.body.lastname
})
Does nothing... (disk adapter in sails.js)...
Borkowski asked 4/12, 2013 at 15:13
3
Solved
I'm trying to:
Find a document according to a search criteria,
If found, update some attributes
If not insert a document with some attributes.
I'm using a Bulk.unOrderedOperation as I'm also p...
Ambsace asked 14/8, 2015 at 22:0
8
Solved
I am starting a project with sails and mysql, and I do'nt know how configurate it to show the queries executed in the console.
6
I've defined a unique field in my model but when I tried to test it seems like it's not being checked by sails because I get a Error (E_UNKNOWN) :: Encountered an unexpected error:
MongoError: E110...
4
Solved
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 ...
Jabalpur asked 21/4, 2015 at 9:50
2
Solved
Is there any way to set database schema with sails-postgresql waterline adapter?
By default postgres adapter allways choose default public schema in database but I want to connect it to another sc...
Penetrant asked 24/6, 2014 at 7:35
2
Solved
I would like to know how to add "OR" condition in waterline query.
Should look like:
User.find().where({
score: { '>': req.params.score},
status: 'user'
OR
status: 'admin'
}).exec(functi...
Froe asked 13/12, 2013 at 13:30
1
I'm starting a new project and I want to use AngularJS as Frontend and SailsJS as Backend. I have a requirement to separate databases for different clients. So, each client must have its own databa...
4
Solved
I've the following model in my SailsJS application, I want to add composite unique key on the fields 'room_name' and 'school_id'.
What I currently do is run this command from mongo:
db.room.ensu...
2
Solved
I was using sailsjs 0.12. It supported index attributes on models, also
i was using npm package Sails-hooks-mongoat to create inverse indexes and so.
It wasn't ideal, but it worked. Right now the...
Shih asked 15/5, 2018 at 22:5
4
Solved
I want to create paginated table using sails.js, mongodb and waterline-ORM.
Is there a any specific way to do pagination in sails.js?
Lucretialucretius asked 30/10, 2014 at 8:20
1
Solved
According to Between Dates using Waterline ORM SailsJS it is possible to do a between query on dates in the Waterline adapter like the following:
User.find({
createdAt: { '>': dateFrom, '<'...
2
Solved
In sails.js, Models support lifecycle callbacks for validate, create, update and destroy.
Is there support for callbacks for find() or query as well? Like beforeFind() and afterFind()?
The idea i...
5
Solved
So,
I'm in the middle of implementing a plugin api for my application, and the plugins can have their own models, imagine this.
SimplePlugin = {
pluginName: 'simple',
pluginConfig: {},
Simp...
Cupo asked 13/1, 2014 at 7:3
4
Solved
I am using Waterline ORM for sails.js. limit and sort are not working when you use groupby, but are working fine when you dont do any grouping .
For example
Model.find({
groupBy:['term'],
sum:[...
Winnifredwinning asked 2/7, 2014 at 19:27
3
Solved
During sails lift I don't yet have all the connection information for my DB.
Is there a way to either have config values dependent on promises or dynamically create a connection after sails lift ...
2
Solved
Goal: Return a list of items that were created between two dates.
According to this issue https://github.com/balderdashy/waterline/issues/110 there is no between function just yet. However the wor...
1
I wanted to test the models of my Trails.js project with mocha. I use the trailpack-waterline to load my models into the Waterline ORM.
Following the Trails Docs I created a User.test.js:
'use st...
Dm asked 8/11, 2017 at 13:3
2
Solved
I'm bit new at node.js/sails.js and was wondering (if possible) how to retrieve multiple database entries by searching for their ids - there is something like this mentioned in the MongoDB document...
Fishbein asked 9/1, 2014 at 20:4
2
Solved
I have a module called 'sails-mongo' and I want to update it to the newest version using the following command:
npm update sails-mongo --save
I also tried uninstall then install again. I tried s...
6
Solved
The following code represents an Account Model in Sails.js v0.9.4 .
module.exports = {
attributes: {
email: {
type: 'email',
unique: true,
required: true
},
password:{
type: 'string',
m...
3
Solved
I am attempting to model an existing MSSQL table in SailsJS. Unsurprisingly the tables in the existing database have a createdAt and updatedAt column similar to what is generated by the SailsJS fra...
3
Solved
I am trying to put my queries into transaction and I am failing in runtime. Error I am getting is :
Object #<bound> has no method 'transaction'
I tried to follow this "documentation".
In ...
Lummox asked 15/1, 2015 at 11:54
1 Next >
© 2022 - 2024 — McMap. All rights reserved.