Skip to content

Fix duplicate pet ID handling - created by agentic #58

@shaykeren

Description

@shaykeren

This issue tracks the changes needed to fix the duplicate pet ID problem that causes IllegalStateException errors.

Problem:

  • The application currently allows pets with duplicate IDs to be added to an owner
  • This causes IllegalStateException when trying to retrieve pets

Solution:

  1. Added validation in Owner.addPet() to prevent duplicate Pet IDs
  2. Added a unique constraint on the pet_id column in the database
  3. Added error handling for duplicate ID scenarios

Related PR: #57

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions