node.js - query using column from junction table -
node.js - query using column from junction table -
i have node
entity many many relationship through edge
var node = db.define('nodes', { 'name': sequelize.string }); var border = db.define('edges', { 'weight': sequelize.string }); node.hasmany(node, { as: 'parents', foreignkey: 'parent_id', through: edge}); node.hasmany(node, { as: 'children', foreignkey: 'child_id', through: edge});
i want nodes children created after specific time using query following
node.getchildren({ include: [edge], where: ['createdat > ?', 1413000965754] }).complete(function(err, children){ // ... });
but cant work.
node.js sequelize.js
Comments
Post a Comment