diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/message/Message.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/message/Message.java index 86f8c2fb..86693081 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/message/Message.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/message/Message.java @@ -17,6 +17,10 @@ @ToString(callSuper = true) @RequiredArgsConstructor public class Message extends BaseGitServiceEntity { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + protected Long id; + @NonNull @Column(name = "sent_at") private final ZonedDateTime sentAt; diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/session/Session.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/session/Session.java index f9e9a6f4..cddd1951 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/session/Session.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/chat/session/Session.java @@ -19,6 +19,9 @@ @ToString(callSuper = true) @NoArgsConstructor public class Session extends BaseGitServiceEntity { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + protected Long id; @OrderColumn(name = "message_order") @OneToMany(mappedBy = "session")