mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-02-17 03:11:12 +00:00
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:
parent
778161f018
commit
c9534421c8
21 changed files with 178 additions and 202 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue