Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Conversation

@gustaavik
Copy link
Member

This pull request includes changes to the UserEntity class and database changelog files to enforce unique constraints and update relationships.

Changes to UserEntity class:

  • Changed the relationship between UserEntity and AddressEntity from @ManyToOne to @OneToOne with orphan removal and added a unique constraint on the default_address_id column (src/main/java/com/zenfulcode/commercify/commercify/entity/UserEntity.java).

Database changelog updates:

  • Added a new changelog file 241230180613-changelog.xml to include a unique constraint on the default_address_id column in the users table (src/main/resources/db/changelog/migrations/241230180613-changelog.xml).
  • Included the new changelog file in the master changelog (src/main/resources/db/changelog/db.changelog-master.xml).

@gustaavik gustaavik added the bug Something isn't working label Dec 30, 2024
@gustaavik gustaavik linked an issue Dec 30, 2024 that may be closed by this pull request
@gustaavik gustaavik merged commit c29df1e into main Dec 30, 2024
1 check passed
@gustaavik gustaavik deleted the 73-fix-weird-relation-between-user-and-address branch February 6, 2025 07:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix weird relation between user and address

2 participants