Hey Everyone,
I am hoping someone can help me figure out the issue with my project I am working on.
It is making a Spring application with Java backend to track inventory in a store.
I have majority running already but having issues with this part:
Incorporate Validations when between min & max that include the following
- give error message of low inventory when adding/updating parts if the inventory goes under the min (DONE)
- Give error message when adding/updating parts if the inventory goes over the max (DONE)
- give error message for low inventory when adding and updating products that lowers associated parts below their min
The 3rd point is where I am struggling. I confirmed the parts & products are associated in the database. I lower all parts to their mins, in order to prepare an error when adjusting products, then try to "Buy Now" & "Update" on the products that have parts associated to them and it never gets caught to give the error message/deny the change. It allows the transaction/update and adjusts the product's inventory level, which neither should happen if any of the associated parts are at their min (they all are at min for my tests).
Been troubleshooting and debugging for days, feels like I am in an endless loop and can't figure it out. Would TRULY appreciate some help.Thanks in advance