Remove PetRepository and use Owner as aggregate

Owner is really the aggregate root in DDD terms and there is no
need to directly access the Pet entity.
This commit is contained in:
Dave Syer 2022-01-05 08:12:09 +00:00 committed by Dave Syer
parent 778161f018
commit c9534421c8
21 changed files with 178 additions and 202 deletions

View file

@ -13,7 +13,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">Owner</label>
<div class="col-sm-10">
<span th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" />
<span th:text="${owner?.firstName + ' ' + owner?.lastName}" />
</div>
</div>
<input

View file

@ -24,7 +24,7 @@
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}"></td>
<td th:text="${pet.type}"></td>
<td
th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}"></td>
th:text="${owner?.firstName + ' ' + owner?.lastName}"></td>
</tr>
</table>