forked from SteamWar/SteamWar
Fix NodeData query to correctly order by CreatedAt descending
This commit is contained in:
@@ -51,7 +51,7 @@ public class NodeData {
|
||||
|
||||
private static final SelectStatement<NodeData> get = new SelectStatement<>(table, "SELECT NodeId, CreatedAt, NodeFormat FROM NodeData WHERE NodeId = ? ORDER BY CreatedAt ");
|
||||
private static final Statement getRevisions = new Statement("SELECT COUNT(DISTINCT CreatedAt) as CNT FROM NodeData WHERE NodeId = ?");
|
||||
private static final SelectStatement<NodeData> getLatest = new SelectStatement<>(table, "SELECT NodeId, CreatedAt, NodeFormat FROM NodeData WHERE NodeId = ? ORDER BY CreatedAt LIMIT 1");
|
||||
private static final SelectStatement<NodeData> getLatest = new SelectStatement<>(table, "SELECT NodeId, CreatedAt, NodeFormat FROM NodeData WHERE NodeId = ? ORDER BY CreatedAt DESC LIMIT 1");
|
||||
|
||||
public static NodeData getLatest(SchematicNode node) {
|
||||
if (node.isDir()) throw new IllegalArgumentException("Node is dir");
|
||||
|
||||
Reference in New Issue
Block a user