diff --git a/model/src/main/java/lcsb/mapviewer/model/map/Comment.java b/model/src/main/java/lcsb/mapviewer/model/map/Comment.java
index 8747682ed2c6b92c52969cf4b2e2a76ab5f3eebb..6bfd0f17db55b671a201861e6e9f324f561dc773 100644
--- a/model/src/main/java/lcsb/mapviewer/model/map/Comment.java
+++ b/model/src/main/java/lcsb/mapviewer/model/map/Comment.java
@@ -50,15 +50,9 @@ public class Comment implements Serializable {
   /**
    * The model that was commented.
    */
-  @ManyToOne(fetch = FetchType.LAZY)
+  @ManyToOne(fetch = FetchType.LAZY, optional=false)
   private ModelData model;
 
-  /**
-   * The model that was commented.
-   */
-  @ManyToOne(fetch = FetchType.LAZY)
-  private ModelData submodel;
-
   /**
    * User who gave the feedback (if logged in).
    */
@@ -314,38 +308,4 @@ public class Comment implements Serializable {
     this.model = model2;
   }
 
-  /**
-   * @return the submodel
-   * @see #submodel
-   */
-  public ModelData getSubmodelData() {
-    return submodel;
-  }
-
-  /**
-   * @param submodel
-   *          the submodel to set
-   * @see #submodel
-   */
-  public void setSubmodelData(ModelData submodel) {
-    this.submodel = submodel;
-  }
-
-  /**
-   * @return the submodel
-   * @see #submodel
-   */
-  public Model getSubmodel() {
-    return this.submodel.getModel();
-  }
-
-  /**
-   * @param submodel
-   *          the submodel to set
-   * @see #submodel
-   */
-  public void setSubmodel(Model submodel) {
-    this.submodel = submodel.getModelData();
-  }
-
 }
diff --git a/model/src/test/java/lcsb/mapviewer/model/map/CommentTest.java b/model/src/test/java/lcsb/mapviewer/model/map/CommentTest.java
index b21e990c59062428a580d527b0aed0eac177d6db..5e4044e69d4e5ff96a41b2a2b0094e95538412ff 100644
--- a/model/src/test/java/lcsb/mapviewer/model/map/CommentTest.java
+++ b/model/src/test/java/lcsb/mapviewer/model/map/CommentTest.java
@@ -64,10 +64,6 @@ public class CommentTest extends ModelTestFunctions {
     assertEquals(pinned, comment.isPinned());
     comment.setRemoveReason(removeReason);
     assertEquals(removeReason, comment.getRemoveReason());
-    comment.setSubmodel(submodel);
-    assertEquals(submodel, comment.getSubmodel());
-    comment.setSubmodelData(submodel.getModelData());
-    assertEquals(submodel.getModelData(), comment.getSubmodelData());
     comment.setTableId(tableId);
     assertEquals(tableId, comment.getTableId());
     comment.setTableName(tableName);
diff --git a/persist/src/main/resources/db/migration/14.0.0~alpha.0/V14.0.0.20190725__comment_submodel_column_is_removed.sql b/persist/src/main/resources/db/migration/14.0.0~alpha.0/V14.0.0.20190725__comment_submodel_column_is_removed.sql
new file mode 100644
index 0000000000000000000000000000000000000000..25aa099906e0391bd144399080a5943902ffc554
--- /dev/null
+++ b/persist/src/main/resources/db/migration/14.0.0~alpha.0/V14.0.0.20190725__comment_submodel_column_is_removed.sql
@@ -0,0 +1,11 @@
+--remove submodel_id column 
+update comment_table set model_id = submodel_id where submodel_id is not null;
+ALTER TABLE comment_table drop COLUMN submodel_id;
+
+--comment must be attached to a model
+delete from comment_table where model_id is null;
+ALTER TABLE comment_table ALTER COLUMN model_id SET NOT NULL;
+
+-- pinned should be not null
+update comment_table set pinned = false where pinned is null;
+ALTER TABLE comment_table ALTER COLUMN pinned SET NOT NULL;
diff --git a/persist/src/test/java/lcsb/mapviewer/persist/dao/map/CommentDaoTest.java b/persist/src/test/java/lcsb/mapviewer/persist/dao/map/CommentDaoTest.java
index 4a0e19615c699f017b3d43bb797e028cc756c74a..1b4f4edd7efd4bac7e5320b19951a686128f547a 100644
--- a/persist/src/test/java/lcsb/mapviewer/persist/dao/map/CommentDaoTest.java
+++ b/persist/src/test/java/lcsb/mapviewer/persist/dao/map/CommentDaoTest.java
@@ -48,9 +48,15 @@ public class CommentDaoTest extends PersistTestFunctions {
 
   @Test
   public void testGetById() throws Exception {
+    Model model = createModel();
+    project.addModel(model);
+    modelDao.add(model);
+    projectDao.update(project);
+
     int counter = (int) commentDao.getCount();
     Comment comment = new Comment();
     comment.setUser(user);
+    comment.setModel(model);
     commentDao.add(comment);
     int counter2 = (int) commentDao.getCount();
     assertEquals(counter + 1, counter2);
diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/projects/comments/CommentRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/projects/comments/CommentRestImpl.java
index 5527253a14d4d328ddd33a5ac23ca4757427958a..24dad6f4343cf5e1313f677f2c9d2a25273f674f 100644
--- a/rest-api/src/main/java/lcsb/mapviewer/api/projects/comments/CommentRestImpl.java
+++ b/rest-api/src/main/java/lcsb/mapviewer/api/projects/comments/CommentRestImpl.java
@@ -107,7 +107,7 @@ public class CommentRestImpl extends BaseRestImpl {
         value = getId(comment);
         break;
       case "modelid":
-        value = comment.getSubmodelData().getId();
+        value = comment.getModelData().getId();
         break;
       case "title":
         value = getTitle(comment);
@@ -279,7 +279,7 @@ public class CommentRestImpl extends BaseRestImpl {
       throw new QueryException("Unknown type of commented object: " + elementType);
     }
 
-    Comment comment = commentService.addComment(name, email, content, model, pointCoordinates, commentedObject, pinned,
+    Comment comment = commentService.addComment(name, email, content, pointCoordinates, commentedObject, pinned,
         submodel);
 
     return preparedComment(comment, createCommentColumnSet(""));
diff --git a/service/src/main/java/lcsb/mapviewer/services/impl/CommentService.java b/service/src/main/java/lcsb/mapviewer/services/impl/CommentService.java
index 3e4268803ee4c25d8277a52c199794bf7a2a5133..709b3560a5da907adf5c355e36159d241f145995 100644
--- a/service/src/main/java/lcsb/mapviewer/services/impl/CommentService.java
+++ b/service/src/main/java/lcsb/mapviewer/services/impl/CommentService.java
@@ -12,13 +12,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import lcsb.mapviewer.common.ObjectUtils;
-import lcsb.mapviewer.common.exception.InvalidClassException;
 import lcsb.mapviewer.model.Project;
 import lcsb.mapviewer.model.map.Comment;
 import lcsb.mapviewer.model.map.model.Model;
 import lcsb.mapviewer.model.map.model.ModelData;
-import lcsb.mapviewer.model.map.reaction.Reaction;
-import lcsb.mapviewer.model.map.species.Element;
 import lcsb.mapviewer.model.user.User;
 import lcsb.mapviewer.persist.dao.map.CommentDao;
 import lcsb.mapviewer.services.interfaces.*;
@@ -79,26 +76,17 @@ public class CommentService implements ICommentService {
   }
 
   @Override
-  public Comment addComment(String name, String email, String content, Model model, Point2D coordinates, Object object,
+  public Comment addComment(String name, String email, String content, Point2D coordinates, Object object,
       boolean pinned, Model submodel) {
     Comment comment = new Comment();
     comment.setName(name);
     comment.setEmail(email);
     comment.setContent(content);
-    comment.setModel(model);
+    comment.setModel(submodel);
     comment.setCoordinates(coordinates);
     if (object != null) {
       comment.setTableName(object.getClass());
       comment.setTableId(ObjectUtils.getIdOfObject(object));
-      if (object instanceof Element) {
-        comment.setSubmodel(((Element) object).getModel());
-      } else if (object instanceof Reaction) {
-        comment.setSubmodel(((Reaction) object).getModel());
-      } else {
-        throw new InvalidClassException("Cannot comment on object of class: " + object.getClass());
-      }
-    } else {
-      comment.setSubmodel(submodel);
     }
     comment.setUser(null);
     comment.setPinned(pinned);
@@ -106,8 +94,8 @@ public class CommentService implements ICommentService {
 
     try {
       EmailSender emailSender = new EmailSender(configurationService);
-      emailSender.sendEmail("New comment appeard in the " + model.getProject().getProjectId(), content,
-          model.getProject().getNotifyEmail());
+      emailSender.sendEmail("New comment appeard in the " + submodel.getProject().getProjectId(), content,
+          submodel.getProject().getNotifyEmail());
     } catch (MessagingException e) {
       logger.error("Problem with sending email.", e);
     }
diff --git a/service/src/main/java/lcsb/mapviewer/services/interfaces/ICommentService.java b/service/src/main/java/lcsb/mapviewer/services/interfaces/ICommentService.java
index 913e4340daa2c7dd827589b6c67b1af82d78a248..1f0b0ee31fc98c472294bde18566dad0c0a8c8d7 100644
--- a/service/src/main/java/lcsb/mapviewer/services/interfaces/ICommentService.java
+++ b/service/src/main/java/lcsb/mapviewer/services/interfaces/ICommentService.java
@@ -30,8 +30,6 @@ public interface ICommentService {
    *          email of the person that comments
    * @param content
    *          content of the comment
-   * @param model
-   *          which map we comment on
    * @param submodel
    *          on which submodel we comment on
    * @param coordinates
@@ -39,7 +37,7 @@ public interface ICommentService {
    * 
    * @return comment object created based on the data provided as parameters
    */
-  Comment addComment(String name, String email, String content, Model model, Point2D coordinates, Object object,
+  Comment addComment(String name, String email, String content, Point2D coordinates, Object object,
       boolean pinned, Model submodel);
 
   /**
diff --git a/service/src/test/java/lcsb/mapviewer/services/impl/CommentServiceTest.java b/service/src/test/java/lcsb/mapviewer/services/impl/CommentServiceTest.java
index 83363c520ecde7089f58c73fc904db25dfae170d..0e3c1dfd79abe9fe3cd516720a170dbad8204da5 100644
--- a/service/src/test/java/lcsb/mapviewer/services/impl/CommentServiceTest.java
+++ b/service/src/test/java/lcsb/mapviewer/services/impl/CommentServiceTest.java
@@ -62,16 +62,11 @@ public class CommentServiceTest extends ServiceTestFunctions {
 
   @Test
   public void testGetAgregatedComments() throws Exception {
-    commentService.addComment("John Doe", "a@a.pl", "Conteneta 1", model, new Point2D.Double(0, 1), alias, false,
-        model);
-    commentService.addComment("John Doe", "a@a.pl", "Contenetb 2", model, new Point2D.Double(0, 2), alias, false,
-        model);
-    commentService.addComment("John Doe", "a@a.pl", "Contenetc 3", model, new Point2D.Double(0, 3), alias2, false,
-        model);
-    commentService.addComment("John Doe", "a@a.pl", "Contenetc 4", model, new Point2D.Double(0, 4), null, false,
-        model);
-    commentService.addComment("John Doe", "a@a.pl", "Contenetc 5", model, new Point2D.Double(0, 5), null, false,
-        model);
+    commentService.addComment("John Doe", "a@a.pl", "Conteneta 1", new Point2D.Double(0, 1), alias, false, model);
+    commentService.addComment("John Doe", "a@a.pl", "Contenetb 2", new Point2D.Double(0, 2), alias, false, model);
+    commentService.addComment("John Doe", "a@a.pl", "Contenetc 3", new Point2D.Double(0, 3), alias2, false, model);
+    commentService.addComment("John Doe", "a@a.pl", "Contenetc 4", new Point2D.Double(0, 4), null, false, model);
+    commentService.addComment("John Doe", "a@a.pl", "Contenetc 5", new Point2D.Double(0, 5), null, false, model);
     CommentService service = new CommentService(null, null, null, null);
     service.setCommentDao(commentDao);
     List<List<Comment>> comments = service.getAgregatedComments(model, null);
@@ -92,7 +87,7 @@ public class CommentServiceTest extends ServiceTestFunctions {
   @Test
   public void testAddComment() throws Exception {
     long counter = commentService.getCommentCount();
-    Comment feedback = commentService.addComment("a", "b", "c", model, new Point2D.Double(0, 0), null, false, model);
+    Comment feedback = commentService.addComment("a", "b", "c", new Point2D.Double(0, 0), null, false, model);
     long counter2 = commentService.getCommentCount();
     assertEquals(counter + 1, counter2);
     commentDao.delete(feedback);
@@ -101,7 +96,7 @@ public class CommentServiceTest extends ServiceTestFunctions {
   @Test
   public void testAddCommentForReaction() throws Exception {
     long counter = commentService.getCommentCount();
-    Comment feedback = commentService.addComment("a", "b", "c", model, new Point2D.Double(0, 0),
+    Comment feedback = commentService.addComment("a", "b", "c", new Point2D.Double(0, 0),
         model.getReactions().iterator().next(), false, model);
     long counter2 = commentService.getCommentCount();
     assertEquals(counter + 1, counter2);
@@ -112,7 +107,7 @@ public class CommentServiceTest extends ServiceTestFunctions {
   public void testAddCommentForAlias() throws Exception {
     Element alias = model.getElementByElementId("sa1");
     long counter = commentService.getCommentCount();
-    Comment feedback = commentService.addComment("a", "b", "c", model, new Point2D.Double(0, 0), alias, false, model);
+    Comment feedback = commentService.addComment("a", "b", "c", new Point2D.Double(0, 0), alias, false, model);
     long counter2 = commentService.getCommentCount();
     assertEquals(counter + 1, counter2);
     commentDao.delete(feedback);
diff --git a/web/src/test/java/lcsb/mapviewer/web/CommentControllerIntegrationTest.java b/web/src/test/java/lcsb/mapviewer/web/CommentControllerIntegrationTest.java
index 1fb757ca94e00f52aea0065947afaafe84e7c276..50e40f3869a52fd8077280bb9780cd711272dd0b 100644
--- a/web/src/test/java/lcsb/mapviewer/web/CommentControllerIntegrationTest.java
+++ b/web/src/test/java/lcsb/mapviewer/web/CommentControllerIntegrationTest.java
@@ -702,7 +702,6 @@ public class CommentControllerIntegrationTest extends ControllerIntegrationTest
 
   private Comment createComment() {
     Comment comment = new Comment();
-    comment.setSubmodelData(map);
     comment.setModel(map);
     comment.setCoordinates(new Point2D.Double(10, 20));
     return comment;