this.period = Period.between(newDay, newDay);
}
@Override
public CalendarEvent planOn(final Calendar calendar) {
if (!isPersisted()) {
<BUG>return calendar.getPlannedEvents().add(this);
}</BUG>
return this;
}
@Override

this.period = Period.between(newDay, newDay);
}
@Override
public CalendarEvent planOn(final Calendar calendar) {
if (!isPersisted()) {
return Transaction.getTransaction().perform(() -> {
CalendarEventRepository repository = CalendarEventRepository.get();
CalendarEvent.this.setCalendar(calendar);
return repository.save(OperationContext.fromCurrentRequester(), CalendarEvent.this);
});
}
return this;
}
@Override
