ItEr33S08ValidacionEProbasFuncionaisItEr32S09: Fixing LazyInitializationException caused because the day assignments of the resources weren't being loaded
This commit is contained in:
parent
65a2993adc
commit
ffbc09e78a
2 changed files with 6 additions and 2 deletions
|
|
@ -171,8 +171,7 @@ class FormBinder {
|
|||
|
||||
void doApply() {
|
||||
lastAllocation = resourceAllocationsBeingEdited.doAllocation();
|
||||
aggregate = lastAllocation
|
||||
.getAggregate();
|
||||
aggregate = lastAllocation.getAggregate();
|
||||
reloadValues();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hibernate.Hibernate;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.navalplanner.business.orders.daos.IHoursGroupDAO;
|
||||
import org.navalplanner.business.orders.entities.HoursGroup;
|
||||
import org.navalplanner.business.planner.daos.ITaskElementDAO;
|
||||
import org.navalplanner.business.planner.entities.DayAssignment;
|
||||
import org.navalplanner.business.planner.entities.GenericResourceAllocation;
|
||||
import org.navalplanner.business.planner.entities.ResourceAllocation;
|
||||
import org.navalplanner.business.planner.entities.Task;
|
||||
|
|
@ -201,6 +203,9 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
|
|||
if (resource.getCalendar() != null) {
|
||||
resource.getCalendar().getWorkableHours(new LocalDate());
|
||||
}
|
||||
for (DayAssignment dayAssignment : resource.getAssignments()) {
|
||||
Hibernate.initialize(dayAssignment);
|
||||
}
|
||||
}
|
||||
|
||||
private void reattachCriterionSatisfactions(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue