Skip to content

Fix order#9

Merged
YehiaFarghaly merged 4 commits intodevfrom
fix-order
May 19, 2025
Merged

Fix order#9
YehiaFarghaly merged 4 commits intodevfrom
fix-order

Conversation

@NourAlPha
Copy link
Contributor

This pull request introduces several changes to enhance functionality, improve data consistency, and configure the application for better development and debugging. The most important updates include adding an event publishing mechanism, modifying entity relationships, updating dependency versions, and enhancing application properties for database configuration and debugging.

Event Publishing and Controller Enhancements:

  • OrderController: Introduced an EventPublisher dependency and a new endpoint /testEventPublisher to test publishing CartCheckedoutEvent messages. This includes creating and publishing events with details such as order items, delivery address, and confirmation type. [1] [2] [3]

Entity Relationship Updates:

  • Address model: Changed the relationship with Order from @ManyToOne to @OneToOne to reflect a one-to-one mapping between an order and its shipping address.
  • OrderService: Updated createOrder to ensure the Order entity sets bidirectional relationships for shippingAddress and orderProducts before saving.

Dependency and Version Updates:

  • pom.xml: Updated podzilla-utils-lib dependency version from v1.1.12 to v1.1.13.

Bug Fixes:

  • CreatedOrderStrategy: Corrected the mapping of OrderItem.productId to use OrderProduct.getProductId() instead of OrderProduct.getId().

Application Configuration:

  • application.properties: Added JPA and Hibernate configurations to enable SQL debugging, format SQL output, and use PostgreSQL as the database platform.

@NourAlPha NourAlPha requested a review from YehiaFarghaly May 19, 2025 15:02
@NourAlPha NourAlPha self-assigned this May 19, 2025
@YehiaFarghaly YehiaFarghaly merged commit 21a8b92 into dev May 19, 2025
1 of 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.

3 participants