Replace model.createRelation with model.relations.create
Add Model.belongsTo() and Model.hasAndBelongsToMany()