You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openNG/models/NodeTag.js

12 lines
356 B
JavaScript

module.exports = function(bookshelf) {
return bookshelf.model("NodeTag", {
tableName: "node_tags",
idAttribute: "id",
nodes: function() {
var wrappedModel;
wrappedModel = Object.create(bookshelf.model("NodeTag"));
return wrappedModel.idAttribute = this.belongsToMany("NodeTag").through("NodeTagAssociation");
}
});
};