atlantis-software / offshore Goto Github PK
View Code? Open in Web Editor NEWThis project forked from balderdashy/waterline
An adapter-based ORM for Node.js with support for mysql, mongo, postgres, redis, and more
License: MIT License
This project forked from balderdashy/waterline
An adapter-based ORM for Node.js with support for mysql, mongo, postgres, redis, and more
License: MIT License
Hi, I've been following the deepPopulate pull req thread on balderdashy, and it's lead me here. I've installed the atlantis-software/waterline#deepPopulate branch, and am using it in place of the one that ships with sails.js, and it works except for when there is a type : "json"
or type : "array"
attribute in a model, when I then get the error...
this.index(alias, child[this.paths[this.path].children[alias].primaryKey], child);
Cannot read property 'primaryKey' of undefined
I experimented using someone's suggestion on that thread and found that adding the additional test case to the if on line 84 of deepCursor.js...
if (child && this.paths[this.path].children[alias]) {
this.index(alias, child[this.paths[this.path].children[alias].primaryKey], child);
}
and it seems to fixes this. Are you aware of this issue already? I couldn't see anything in the PRs.
Also, a general question. How would I use offshore in place of waterline in a sails project? Can I just point sails at offshore instead of waterline using an npm link or something?
Thanks, Dan
I saw in offshore-validation you can define a $message but I don't know is it is possible to define that message in the collection definition.
Thank you in adavnce.
Hi, what do I need to do to enable use of deep populate with Sails blueprints?
Cheers
Adam
Hi !
Express can return (with req.ip) ::ffff:127.0.0.1 (or other ipv4 address translated), but it's appear to be invalid with Offshore. ex:
///
module BannedModule {
var time_banned = 3600;
class Class {
attributes: Object; constructor(attr: Object) { this.attributes = attr; } beforeCreate(values, cb: Function) { var expires = (new Date().getTime()) + (time_banned * 1000); values.expires = new Date(expires); }
}
export var model= new Class({
ip: { ip: true, required: true, unique: true }, reason: { type: "string" }, expires: { type: "datetime" }
});
}
module.exports = BannedModule.model;
Banned.create({ip: req.ip, reason: "weird guy"}).then(console.log).catch(console.log)
ps : sorry for bad style markdown and poor english
here is continuation of PR
relink conversations:
https://github.com/balderdashy/sails-mysql/issues/292
https://github.com/balderdashy/sails-mysql/issues/291
https://github.com/particlebanana/waterline-query-docs/issues/2
https://github.com/balderdashy/waterline/issues/308
balderdashy/sails#3429
balderdashy/waterline-docs#98
https://github.com/balderdashy/sails-mongo/issues/108
https://github.com/balderdashy/waterline/issues/1157
balderdashy/sails#3105
https://github.com/balderdashy/waterline/issues/484
https://github.com/balderdashy/waterline/issues/266
Can you update the documentation or help me integrate with sails? I would like to use some of the added features to this fork of sails ORM but unsure of how to make this work within the Sails ecosystem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.