Skip to content

Commit

Permalink
SAK-39966 eduservices assignmentNameExists regression in query (sakai…
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored and ottenhoff committed May 23, 2018
1 parent 8805460 commit 61598cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,9 @@ protected boolean assignmentNameExists(String name, Gradebook gradebook)
{
Number count = (Number) getHibernateTemplate().execute(session -> session
.createCriteria(GradableObject.class)
.createAlias("gradebook", "gb")
.add(Restrictions.eq("name", name))
.add(Restrictions.eq("gradebook", gradebook))
.add(Restrictions.eq("gb.uid", gradebook.getUid()))
.add(Restrictions.eq("removed", false))
.setProjection(Projections.rowCount())
.uniqueResult());
Expand Down

0 comments on commit 61598cc

Please sign in to comment.