Skip to content
Snippets Groups Projects

Add @Where conditions on SingleSession and SharedSession

Files

@@ -44,9 +44,9 @@ import org.hibernate.annotations.Where;
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = "session_deleted_at IS NULL")
@SQLDelete(sql = "UPDATE session SET session_deleted_at = NOW() WHERE id = ?")
@Inheritance(strategy = InheritanceType.JOINED)
@Where(clause = "deleted_at IS NULL")
@SQLDelete(sql = "UPDATE session SET deleted_at = NOW() WHERE id = ?")
public abstract class Session {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -77,7 +77,7 @@ public abstract class Session {
private String description;
@Builder.Default
private LocalDateTime deletedAt = null;
private LocalDateTime sessionDeletedAt = null;
/**
* The rooms that this session is hosted in. This information can be used to schedule TAs to be seated in
Loading