From 03a52f24901329bf6e14d7fb3fdaf7c99118e660 Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Wed, 25 Oct 2023 22:26:57 -0600 Subject: [PATCH] added modified date for connections --- buildSrc/src/main/groovy/nucleodb.app.gradle | 2 +- buildSrc/src/main/groovy/nucleodb.library.gradle | 2 +- .../library/database/tables/Connection.java | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/nucleodb.app.gradle b/buildSrc/src/main/groovy/nucleodb.app.gradle index de6d3fc..202ef27 100644 --- a/buildSrc/src/main/groovy/nucleodb.app.gradle +++ b/buildSrc/src/main/groovy/nucleodb.app.gradle @@ -3,7 +3,7 @@ plugins { } group = 'com.nucleodb' -version = '1.7.1' +version = '1.7.2' repositories { mavenCentral() diff --git a/buildSrc/src/main/groovy/nucleodb.library.gradle b/buildSrc/src/main/groovy/nucleodb.library.gradle index 795e84c..1a01a7a 100644 --- a/buildSrc/src/main/groovy/nucleodb.library.gradle +++ b/buildSrc/src/main/groovy/nucleodb.library.gradle @@ -3,7 +3,7 @@ plugins { } group = 'com.nucleodb' -version = '1.9.1' +version = '1.9.2' repositories { mavenCentral() diff --git a/library/src/main/java/com/nucleocore/library/database/tables/Connection.java b/library/src/main/java/com/nucleocore/library/database/tables/Connection.java index e9ec211..507d405 100644 --- a/library/src/main/java/com/nucleocore/library/database/tables/Connection.java +++ b/library/src/main/java/com/nucleocore/library/database/tables/Connection.java @@ -27,6 +27,8 @@ public class Connection implements Serializable, Comparable{ private String label; private Instant date; + private Instant modified; + public long version = 0; @JsonIgnore @@ -37,6 +39,7 @@ public class Connection implements Serializable, Comparable{ public Connection() { this.uuid = UUID.randomUUID().toString(); this.date = Instant.now(); + this.modified = Instant.now(); } public Connection(DataEntry from, String label, DataEntry to) { @@ -47,6 +50,7 @@ public Connection(DataEntry from, String label, DataEntry to) { this.toTable = to.getTableName(); this.fromTable = from.getTableName(); this.date = Instant.now(); + this.modified = Instant.now(); } public Connection(DataEntry from, String label, DataEntry to, Map metadata) { @@ -58,6 +62,7 @@ public Connection(DataEntry from, String label, DataEntry to, Map