Commit fdd7a4db authored by Odair M.'s avatar Odair M. Committed by Matheus Horstmann

adiciona relacao bidirecional entre turma e turmas na uniao de duas turmas

parent 438ae482
......@@ -14,7 +14,7 @@ module.exports = function(Departamento) {
"relation":"turmas",
"scope": {
"where": {"merged": false},
"include": ["professores","cursos",{
"include": ["professores","cursos","turmasMergedss",{
"relation": "horarios",
"scope": {
"where": {"visible": true},
......
......@@ -49,8 +49,12 @@
"turmasMergeds": {
"type": "belongsTo",
"model": "Turma",
"foreignKey": "mergedCod",
"invert": true
"foreignKey": "mergedCod"
},
"turmasMergedss": {
"type": "hasMany",
"model": "Turma",
"foreignKey": "mergedCod"
},
"professores": {
"type": "hasAndBelongsToMany",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment