ItEr44S11CUImportarTraballoRealizadoPorSubcontrataItEr43S14: Fixed lazy exception loading resource calendars and its ancestors.

This commit is contained in:
Manuel Rego Casasnovas 2010-01-20 21:08:31 +01:00 committed by Javier Moran Rua
parent aa52d8095e
commit 90ddbe4c50

View file

@ -352,7 +352,6 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
resourceDAO.reattach(resource);
reattachCriterionSatisfactions(resource.getCriterionSatisfactions());
if (resource.getCalendar() != null) {
calendarDAO.reattachUnmodifiedEntity(resource.getCalendar());
loadCalendar(resource.getCalendar());
}
for (DayAssignment dayAssignment : resource.getAssignments()) {
@ -364,6 +363,7 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
}
private void loadCalendar(BaseCalendar baseCalendar) {
calendarDAO.reattachUnmodifiedEntity(baseCalendar);
for (CalendarData calendarData : baseCalendar.getCalendarDataVersions()) {
calendarData.getHoursPerDay().size();
if (calendarData.getParent() != null) {