Skip to content

Refactor relationships in AssignedOrders and Stock models#58

Merged
YehiaFarghaly merged 1 commit intodevfrom
hot-fix-warehouse
May 19, 2025
Merged

Refactor relationships in AssignedOrders and Stock models#58
YehiaFarghaly merged 1 commit intodevfrom
hot-fix-warehouse

Conversation

@NourAlPha
Copy link
Contributor

This pull request updates the entity relationships in the AssignedOrders and Stock models to improve database consistency and better reflect the intended data structure. The changes include renaming a mapped field, introducing a new relationship, and modifying an existing join column.

Changes to entity relationships:

  • AssignedOrders model:

    • Updated the mapping of the items field to use assignedOrder instead of packagedOrder in the Stock entity. ([src/main/java/com/podzilla/warehouse/Models/AssignedOrders.javaL36-R36](https://github.com/Podzilla/warehouse/pull/58/files#diff-0903df3387465c62f90f237168b13fcec88a43dea606a450e13b29c9649bbd51L36-R36))
  • Stock model:

    • Added a new @ManyToOne relationship to the AssignedOrders entity, with a join column named assigned_order_id and a nullable constraint. This introduces a reverse mapping to AssignedOrders. ([src/main/java/com/podzilla/warehouse/Models/Stock.javaR37-R44](https://github.com/Podzilla/warehouse/pull/58/files#diff-2e58d935c5017aa420bf97eefc92901538aa4fa2e972844fe5f1c118ad7686b1R37-R44))
    • Renamed the join column for the existing packagedOrder relationship to packaged_order_id for clarity and consistency. ([src/main/java/com/podzilla/warehouse/Models/Stock.javaR37-R44](https://github.com/Podzilla/warehouse/pull/58/files#diff-2e58d935c5017aa420bf97eefc92901538aa4fa2e972844fe5f1c118ad7686b1R37-R44))

@NourAlPha NourAlPha requested a review from YehiaFarghaly May 19, 2025 16:29
@NourAlPha NourAlPha self-assigned this May 19, 2025
@YehiaFarghaly YehiaFarghaly merged commit 782f7ec into dev May 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants