aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2019-05-13 12:44:56 +0200
committerxg353y <xg353y@intl.att.com>2019-05-13 14:27:58 +0200
commit5a03836ae696fb3377d6086e923650e2a96aebd0 (patch)
treee7671abfcade5abf887c3efde44fa565c95996ef
parent36d6db0d7b7cb2f8f1105b1a393d1f5f1f575564 (diff)
Update the order of the loop log
Update the order of the loop log, so that the latest log will be shown on the top. Issue-ID: CLAMP-383 Change-Id: I8d377f923f2bdd80deb5db1828f36cc4adc76a9f Signed-off-by: xg353y <xg353y@intl.att.com>
-rw-r--r--src/main/java/org/onap/clamp/loop/Loop.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java
index 0041c589e..f47a6a08c 100644
--- a/src/main/java/org/onap/clamp/loop/Loop.java
+++ b/src/main/java/org/onap/clamp/loop/Loop.java
@@ -45,6 +45,7 @@ import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
import javax.persistence.Table;
import org.hibernate.annotations.Type;
@@ -114,6 +115,7 @@ public class Loop implements Serializable {
@Expose
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "loop")
+ @OrderBy("log_instant DESC")
private Set<LoopLog> loopLogs = new HashSet<>();
public Loop() {