Skip to content

Commit

Permalink
Fixed database issue mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaars committed Jan 21, 2018
1 parent 2cc6c23 commit ee11381
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class LessonTracker {
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private final Set<Assignment> solvedAssignments = Sets.newHashSet();
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private final List<Assignment> allAssignments = Lists.newArrayList();
private final Set<Assignment> allAssignments = Sets.newHashSet();
@Getter
private int numberOfAttempts = 0;

Expand Down
13 changes: 4 additions & 9 deletions webwolf/src/main/java/org/owasp/webwolf/mailbox/Email.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package org.owasp.webwolf.mailbox;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
Expand All @@ -17,17 +12,16 @@
* @author nbaars
* @since 8/20/17.
*/
@Builder
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
public class Email implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private LocalDateTime time;
@Column(length = 1024)
private String contents;
private String sender;
private String title;
Expand All @@ -48,4 +42,5 @@ public String getTime() {
public String getShortSender() {
return sender.substring(0, sender.indexOf("@"));
}
}

}

0 comments on commit ee11381

Please sign in to comment.