Skip to content

Commit

Permalink
fix display owner. Closes springframeworkguru#65
Browse files Browse the repository at this point in the history
  • Loading branch information
springframeworkguru committed Sep 22, 2018
1 parent 888d2a8 commit fa6b1b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public class Pet extends BaseEntity{
private LocalDate birthDate;

@OneToMany(cascade = CascadeType.ALL, mappedBy = "pet")
private Set<Visit> vists = new HashSet<>();
private Set<Visit> visits = new HashSet<>();

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ public class PetType extends BaseEntity {
@Column(name = "name")
private String name;


@Override
public String toString() {
return name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2>Pets and Visits</h2>
<dd
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></dd>
<dt>Type</dt>
<dd th:text="${pet.type}" /></dd>
<dd th:text="${pet.petType}" /></dd>
</dl>
</td>
<td valign="top">
Expand Down

0 comments on commit fa6b1b3

Please sign in to comment.