diff --git a/JavaSource/ChangeLog.hbm.xml b/JavaSource/ChangeLog.hbm.xml
index d4f45ea59f..c49eb56ecb 100644
--- a/JavaSource/ChangeLog.hbm.xml
+++ b/JavaSource/ChangeLog.hbm.xml
@@ -101,8 +101,7 @@
+ type="byte[]"/>
diff --git a/JavaSource/Event.hbm.xml b/JavaSource/Event.hbm.xml
index 87e45e7df9..b8b5c53225 100644
--- a/JavaSource/Event.hbm.xml
+++ b/JavaSource/Event.hbm.xml
@@ -130,7 +130,7 @@
type="java.lang.Long"
not-null="false"
lazy="true"
- formula=" ( select sa.department_uniqueid from %SCHEMA%.class_ c, %SCHEMA%.scheduling_subpart ss, %SCHEMA%.instr_offering_config ioc, %SCHEMA%.instructional_offering io, %SCHEMA%.course_offering co, %SCHEMA%.subject_area sa where c.uniqueid = class_id and ss.uniqueid = c.subpart_id and ioc.uniqueid = ss.config_id and io.uniqueid = ioc.instr_offr_id and co.instr_offr_id = io.uniqueid and co.is_control = 1 and sa.uniqueid = co.subject_area_id ) "
+ formula=" ( select sa.department_uniqueid from %SCHEMA%.class_ c, %SCHEMA%.scheduling_subpart ss, %SCHEMA%.instr_offering_config ioc, %SCHEMA%.instructional_offering io, %SCHEMA%.course_offering co, %SCHEMA%.subject_area sa where c.uniqueid = class_id and ss.uniqueid = c.subpart_id and ioc.uniqueid = ss.config_id and io.uniqueid = ioc.instr_offr_id and co.instr_offr_id = io.uniqueid and co.is_control = %TRUE% and sa.uniqueid = co.subject_area_id ) "
/>
+ type="java.lang.Boolean"
+ not-null="false"/>
+ formula=" ( select sa.department_uniqueid from %SCHEMA%.pit_sched_subpart ss, %SCHEMA%.pit_instr_offer_config ioc, %SCHEMA%.pit_instr_offering io, %SCHEMA%.pit_course_offering co, %SCHEMA%.subject_area sa where ss.uniqueid = pit_subpart_id and ioc.uniqueid = ss.pit_config_id and io.uniqueid = ioc.pit_instr_offr_id and co.pit_instr_offr_id = io.uniqueid and co.is_control = %TRUE% and sa.uniqueid = co.subject_area_id ) "/>
diff --git a/JavaSource/PreferenceGroup.hbm.xml b/JavaSource/PreferenceGroup.hbm.xml
index e4ca5a6b8a..92acfbdd85 100644
--- a/JavaSource/PreferenceGroup.hbm.xml
+++ b/JavaSource/PreferenceGroup.hbm.xml
@@ -87,7 +87,7 @@
@@ -102,7 +102,7 @@
name="controllingCourseOffering"
class="CourseOffering"
lazy="proxy"
- formula="(select co.uniqueid from %SCHEMA%.scheduling_subpart s, %SCHEMA%.instr_offering_config c, %SCHEMA%.instructional_offering io, %SCHEMA%.course_offering co where s.uniqueid=UNIQUEID and s.config_id=c.uniqueid and c.instr_offr_id=io.uniqueid and co.is_control=1 and co.instr_offr_id=io.uniqueid)"
+ formula="(select co.uniqueid from %SCHEMA%.scheduling_subpart s, %SCHEMA%.instr_offering_config c, %SCHEMA%.instructional_offering io, %SCHEMA%.course_offering co where s.uniqueid=UNIQUEID and s.config_id=c.uniqueid and c.instr_offr_id=io.uniqueid and co.is_control = %TRUE% and co.instr_offr_id=io.uniqueid)"
/>
-->
+ formula=" ( select sa.department_uniqueid from %SCHEMA%.scheduling_subpart ss, %SCHEMA%.instr_offering_config ioc, %SCHEMA%.instructional_offering io, %SCHEMA%.course_offering co, %SCHEMA%.subject_area sa where ss.uniqueid = subpart_id and ioc.uniqueid = ss.config_id and io.uniqueid = ioc.instr_offr_id and co.instr_offr_id = io.uniqueid and co.is_control = %TRUE% and sa.uniqueid = co.subject_area_id ) "/>
+ formula=" ( select a.uniqueid from %SCHEMA%.assignment a, %SCHEMA%.solution s, %SCHEMA%.department d, %SCHEMA%.solver_group g where a.class_id=uniqueid and a.solution_id=s.uniqueid and s.commited = %TRUE% and d.uniqueid=managing_dept and s.owner_id=g.uniqueid and d.solver_group_id=g.uniqueid ) "/>