scala-pet-store icon indicating copy to clipboard operation
scala-pet-store copied to clipboard

Pet and Order status can get out of sync

Open arosien opened this issue 5 years ago • 0 comments

(sort of a design issue...)

Both Pet and Order have their own status which is updated independently. That is, nothing enforces they correspond, like OrderStatus.Delivered implies PetStatus.Adopted.

Some ideas to reconcile:

  • status: PetStatus could be removed from Pet altogether.
  • OrderService could update the PetRepository as necessary, and other methods to update the PetStatus could be limited.

arosien avatar Jan 28 '20 19:01 arosien