[virtualcommons-svn] SF.net SVN: virtualcommons:[444] mentalmodels/trunk/src/main/java/edu/asu/ co
Status: Beta
Brought to you by:
alllee
From: <see...@us...> - 2010-01-25 04:41:32
|
Revision: 444 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=444&view=rev Author: seematalele Date: 2010-01-25 04:41:25 +0000 (Mon, 25 Jan 2010) Log Message: ----------- Changed the HQL query parameters: getLastDay. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-16 00:30:20 UTC (rev 443) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-25 04:41:25 UTC (rev 444) @@ -33,7 +33,7 @@ Student student; public static final String getLastDay = "SELECT max(d.dayNumber) FROM DayByDayDecisions d " + - "where d.student=:student and d.studentStrategy != NULL"; + "where d.student.id=:studentId and d.studentStrategy.id != NULL"; /** * This method is for Psychometric, Categorical and text question types. @@ -91,9 +91,9 @@ studentStrategy.setThreshold(clientStudentStrategy.getThreshold()); studentStrategy.setRepeatedDecisionNo(clientStudentStrategy.getRepeatedDecisionNo()); getStudentStrategyDao().save(studentStrategy); - + Query getLastDayForStudent = getStudentStrategyDao().getCurrentSession().createQuery(getLastDay); - getLastDayForStudent.setEntity("student", studentStrategy.getStudent()); + getLastDayForStudent.setEntity("studentId", studentStrategy.getStudent().getId()); Iterator<?> lastdayIterator = getLastDayForStudent.list().iterator(); getLogger().debug("Days are : " + studentStrategy.getDays()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |