You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/br/ufjf/tcc/persistent/impl/TCCDAO.java
+4-2
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,8 @@ public List<TCC> getTCCsByOrientador(Usuario user) {
138
138
try {
139
139
Queryquery = getSession()
140
140
.createQuery(
141
-
"SELECT t FROM TCC AS t JOIN FETCH t.aluno JOIN FETCH t.orientador LEFT JOIN FETCH t.coOrientador WHERE t.orientador = :user OR t.coOrientador = :user");
141
+
"SELECT DISTINCT t FROM TCC AS t JOIN FETCH t.aluno JOIN FETCH t.orientador LEFT JOIN FETCH t.coOrientador LEFT JOIN FETCH t.participacoes AS ps "
142
+
+ " LEFT JOIN FETCH ps.professor AS prof WHERE t.orientador = :user OR t.coOrientador = :user");
142
143
query.setParameter("user", user);
143
144
results = query.list();
144
145
getSession().close();
@@ -156,7 +157,8 @@ public List<TCC> getTCCsByUserParticipacao(Usuario user) {
156
157
try {
157
158
Queryquery = getSession()
158
159
.createQuery(
159
-
"SELECT t FROM TCC AS t JOIN FETCH t.aluno JOIN FETCH t.orientador LEFT JOIN FETCH t.coOrientador LEFT JOIN t.participacoes AS p WHERE p.professor = :user");
160
+
"SELECT t FROM TCC AS t JOIN FETCH t.aluno JOIN FETCH t.orientador LEFT JOIN FETCH t.coOrientador LEFT JOIN FETCH t.participacoes AS p "
0 commit comments