Commit 880e7128 authored by didonet's avatar didonet

Included one restriction on section poses to show only sections with

students.
parent 9aec51c2
......@@ -52,10 +52,11 @@ public class SectionPos {
public static Object findSectionPosesByYear(String year) {
String sql = null;
String transcripts = " id in (select transcript_section from transcript) ";
if (year.isEmpty())
sql = " order by section_year, period";
sql = "where "+transcripts+" order by section_year, period";
else
sql = " where section_year="+year+" order by section_year, period";
sql = " where "+transcripts+" and section_year="+year+" order by section_year, period";
return entityManager().createNativeQuery("select * from Section_Pos"+sql, SectionPos.class).getResultList();
}
......
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