From 4ad6189a1e77845f0fa4ec06ac08e24347af7e44 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Tue, 29 Jun 2021 18:02:30 +0200
Subject: [PATCH] maybe eager loading for table columns

---
 .../src/main/java/at/tuwien/service/TableService.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/TableService.java b/fda-table-service/services/src/main/java/at/tuwien/service/TableService.java
index 6d1cfc1e48..0cb75ab45e 100644
--- a/fda-table-service/services/src/main/java/at/tuwien/service/TableService.java
+++ b/fda-table-service/services/src/main/java/at/tuwien/service/TableService.java
@@ -225,7 +225,9 @@ public class TableService {
     // TODO ms what is this for? It does ony print to stdout
     public QueryResultDto showData(Long databaseId, Long tableId) throws ImageNotSupportedException,
             DatabaseNotFoundException, TableNotFoundException, DatabaseConnectionException, DataProcessingException {
-        QueryResultDto queryResult = postgresService.getAllRows(findDatabase(databaseId), findById(databaseId, tableId));
+        final Table tmpTable = findById(databaseId, tableId);
+        log.debug("=================> {}", tmpTable);
+        QueryResultDto queryResult = postgresService.getAllRows(findDatabase(databaseId), tmpTable);
         for (Map<String, Object> m : queryResult.getResult()) {
             for (Map.Entry<String, Object> entry : m.entrySet()) {
                 log.debug("{}: {}", entry.getKey(), entry.getValue());
-- 
GitLab