Skip to content

Commit 5c0f1e3

Browse files
strailovavgustinmm
andauthored
Remove table alias on Set in order to comply with postgresql when stopping a rollout (#3003)
* Fix stop rollout when using PosgreSQL (2) (#3000) Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com> * Remove table alias on SET when stopping rollouts (#3002) Signed-off-by: strailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com> Signed-off-by: strailov <Stanislav.Trailov@bosch.io> Co-authored-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
1 parent 1a5afbc commit 5c0f1e3

File tree

1 file changed

+2
-2
lines changed
  • hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management

1 file changed

+2
-2
lines changed

hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management/JpaRolloutManagement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ private void storeActionsAndStatuses(List<JpaAction> actions, Action.Status stat
604604
private int updateTargetAssignedDsWithFirstActiveAction(List<Long> targetIds) {
605605
final Query updateQuery = entityManager.createNativeQuery(
606606
"UPDATE sp_target t " +
607-
"SET t.assigned_distribution_set = ( " +
607+
"SET assigned_distribution_set = ( " +
608608
"SELECT a.distribution_set" +
609609
" FROM sp_action a" +
610610
" WHERE a.target = t.id AND a.active = TRUE" +
@@ -623,7 +623,7 @@ private int updateTargetAssignedDsWithFirstActiveAction(List<Long> targetIds) {
623623
private int updateTargetAssignedDsWithInstalledIfNoActiveActions(List<Long> targetIds) {
624624
final Query updateQuery = entityManager.createNativeQuery(
625625
"UPDATE sp_target t " +
626-
"SET t.assigned_distribution_set = t.installed_distribution_set, t.update_status = 1 " +
626+
"SET assigned_distribution_set = t.installed_distribution_set, update_status = 1 " +
627627
"WHERE t.id IN (" + Jpa.formatNativeQueryInClause("tid", targetIds) + ") " +
628628
" AND (SELECT count(*) FROM sp_action a " +
629629
" WHERE a.target = t.id and a.active = TRUE) = 0"

0 commit comments

Comments
 (0)