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.coffee

8 lines
270 B
CoffeeScript

module.exports = (bookshelf) ->
bookshelf.model "NodeTag",
tableName: "node_tags"
idAttribute: "id"
nodes: ->
wrappedModel = Object.create(bookshelf.model("NodeTag"))
wrappedModel.idAttribute =
this.belongsToMany("NodeTag").through "NodeTagAssociation"