Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
eac048f0
Commit
eac048f0
authored
7 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Make sure deletion of forecast summaries works also when there are no
active forecasts
parent
b9094a6f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java
+13
-5
13 additions, 5 deletions
.../no/nibio/vips/logic/controller/session/ForecastBean.java
with
13 additions
and
5 deletions
src/main/java/no/nibio/vips/logic/controller/session/ForecastBean.java
+
13
−
5
View file @
eac048f0
...
...
@@ -868,11 +868,19 @@ public class ForecastBean {
}
}
// Delete all summaries from not active forecasts
em
.
createNativeQuery
(
"DELETE FROM forecast_summary "
+
"WHERE forecast_configuration_id NOT IN :activeForecastIds"
)
.
setParameter
(
"activeForecastIds"
,
activeForecastIds
)
.
executeUpdate
();
if
(
activeForecastIds
!=
null
&&
!
activeForecastIds
.
isEmpty
())
{
// Delete all summaries from not active forecasts
em
.
createNativeQuery
(
"DELETE FROM forecast_summary "
+
"WHERE forecast_configuration_id NOT IN :activeForecastIds"
)
.
setParameter
(
"activeForecastIds"
,
activeForecastIds
)
.
executeUpdate
();
}
else
{
em
.
createNativeQuery
(
"TRUNCATE forecast_summary"
).
executeUpdate
();
}
}
public
List
<
ForecastConfiguration
>
getForecastConfigurationWithSummaries
(
List
<
Long
>
forecastConfigurationIds
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment