Skip to content

Conversation

@jc-programs
Copy link

Importarn remarks:

  1. Added to order-controller
    Operation Type URL
    add menus PUT /api/v1/order/{id}/menus/{menus}
    delete menus DELETE /api/v1/order/{id}/menus/{menus}
  2. This test deleteByIdInMenuQtyRepository in file src/test/java/dev/example/restaurantManager/OrderMenuQtyTest.java
    is not working and should work.
    // trying with id -> NOT WORKING
    orderMenuQtyRepository.deleteById(omqToDelete.getId());
    // trying with object -> NOT WORKING
    orderMenuQtyRepository.delete(omqToDelete);
    

All Tasks done

  1. Create a New Join Table Entity
    • Create a new entity class (e.g., OrderMenuQty) to serve as the join table
    • Include necessary fields such as id, quantity, and any other relevant information
    • Establish relationships with Order and Menu entities
  2. Update Order and Menu Entities
    • Modify the existing relationship annotations in Order and Menu classes
    • Update to use the new join table entity
  3. Create Repository for Join Table Entity
    • Implement a new repository interface for the join table entity
    • Add any necessary derived query methods
  4. Update Service Layer
    • Modify existing service methods to work with the new structure
    • Implement new methods to handle operations involving multiple menu items in an order
  5. Refactor Existing Tests
    • Update existing test cases to reflect the new relationship structure
    • Ensure all previous functionality is still correctly tested
  6. Create New Test Cases
    • Implement new test cases to verify the ability to add multiple instances of the same menu to an order
    • Test scenarios involving quantity changes and removals
  7. Update API Endpoints (if applicable and optional)
    • If your project includes a REST API, update the relevant endpoints to support the new structure
  8. Documentation (optional)
    • Update JavaDoc/Swagger comments for all modified and new classes/methods
    • Provide clear explanations of the new relationship structure in the project README or an updated UML in the documentation project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants