Skip to content

Commit

Permalink
JPA 02 - Challenge komplett
Browse files Browse the repository at this point in the history
  • Loading branch information
Corinnalovesbaileys committed Nov 11, 2021
1 parent 22b1c6d commit d08edfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -13,7 +13,7 @@ public class School {
private Long capacity;
private String country;

@OneToMany(mappedBy = "school", cascade = CascadeType.ALL)
@OneToMany(mappedBy = "school")
private List<Wizard> wizards;

public School() {
Expand Down
Expand Up @@ -16,8 +16,8 @@ public class Wizard {
private String biography;
private boolean muggle;

//@ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.REFRESH, optional = false)
//@JoinColumn(name = "school_id", nullable = false)
@ManyToOne
@JoinColumn(name = "school_id")
private School school;

public Wizard() {
Expand Down

0 comments on commit d08edfc

Please sign in to comment.