From 652511ebdd2e4e598aeabfd6f8dbc7b02a9a227f Mon Sep 17 00:00:00 2001
From: Piotr Gawron <p.gawron@atcomp.pl>
Date: Tue, 8 Apr 2025 14:36:57 +0200
Subject: [PATCH] revert changes

---
 .../mapviewer/model/map/reaction/ReactionNode.java   |  7 -------
 .../mapviewer/services/impl/ReactionService.java     |  4 ----
 .../test/java/lcsb/mapviewer/web/api/NewApiDocs.java | 12 ------------
 3 files changed, 23 deletions(-)

diff --git a/model/src/main/java/lcsb/mapviewer/model/map/reaction/ReactionNode.java b/model/src/main/java/lcsb/mapviewer/model/map/reaction/ReactionNode.java
index 32ba19199..18ad6b08a 100644
--- a/model/src/main/java/lcsb/mapviewer/model/map/reaction/ReactionNode.java
+++ b/model/src/main/java/lcsb/mapviewer/model/map/reaction/ReactionNode.java
@@ -76,13 +76,6 @@ public abstract class ReactionNode extends AbstractNode {
     return element;
   }
 
-  public String getElementId() {
-    if (element != null) {
-      return element.getElementId();
-    }
-    return null;
-  }
-
   /**
    * @param element the element to set
    * @see #element
diff --git a/service/src/main/java/lcsb/mapviewer/services/impl/ReactionService.java b/service/src/main/java/lcsb/mapviewer/services/impl/ReactionService.java
index 1d312720e..3c89c3b15 100644
--- a/service/src/main/java/lcsb/mapviewer/services/impl/ReactionService.java
+++ b/service/src/main/java/lcsb/mapviewer/services/impl/ReactionService.java
@@ -3,7 +3,6 @@ package lcsb.mapviewer.services.impl;
 import lcsb.mapviewer.model.map.MiriamType;
 import lcsb.mapviewer.model.map.model.ModelData;
 import lcsb.mapviewer.model.map.reaction.Reaction;
-import lcsb.mapviewer.model.map.reaction.ReactionNode;
 import lcsb.mapviewer.persist.dao.map.ReactionDao;
 import lcsb.mapviewer.persist.dao.map.ReactionProperty;
 import lcsb.mapviewer.services.ObjectNotFoundException;
@@ -87,9 +86,6 @@ public class ReactionService implements IReactionService {
     if (initializeLazy) {
       for (final Reaction reaction : result) {
         Hibernate.initialize(reaction.getModelData());
-        for (ReactionNode node : reaction.getReactionNodes()) {
-          Hibernate.initialize(node.getElement());
-        }
       }
     }
     return result;
diff --git a/web/src/test/java/lcsb/mapviewer/web/api/NewApiDocs.java b/web/src/test/java/lcsb/mapviewer/web/api/NewApiDocs.java
index e07f84d8f..a0d15eec7 100644
--- a/web/src/test/java/lcsb/mapviewer/web/api/NewApiDocs.java
+++ b/web/src/test/java/lcsb/mapviewer/web/api/NewApiDocs.java
@@ -991,10 +991,6 @@ public class NewApiDocs {
             .description("identifier of the element for this product")
             .type(JsonFieldType.NUMBER)
             .optional(),
-        fieldWithPath(prefix + "products[].elementId")
-            .description("element identifier of the element for this product")
-            .type(JsonFieldType.STRING)
-            .optional(),
         fieldWithPath(prefix + "products[].stoichiometry")
             .description("SBML stoichiometry")
             .type(JsonFieldType.NUMBER)
@@ -1016,10 +1012,6 @@ public class NewApiDocs {
             .description("identifier of the element for this reactant")
             .type(JsonFieldType.NUMBER)
             .optional(),
-        fieldWithPath(prefix + "reactants[].elementId")
-            .description("element identifier of the element for this reactant")
-            .type(JsonFieldType.STRING)
-            .optional(),
         fieldWithPath(prefix + "reactants[].stoichiometry")
             .description("SBML stoichiometry")
             .type(JsonFieldType.NUMBER)
@@ -1041,10 +1033,6 @@ public class NewApiDocs {
             .description("identifier of the element for this modifier")
             .type(JsonFieldType.NUMBER)
             .optional(),
-        fieldWithPath(prefix + "modifiers[].elementId")
-            .description("element identifier of the element for this modifier")
-            .type(JsonFieldType.STRING)
-            .optional(),
         fieldWithPath(prefix + "modifiers[].stoichiometry")
             .description("SBML stoichiometry")
             .type(JsonFieldType.NUMBER)
-- 
GitLab