Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manufacturer uniqueness #7

Merged
merged 2 commits into from
Nov 18, 2024
Merged

fix: manufacturer uniqueness #7

merged 2 commits into from
Nov 18, 2024

Conversation

aokj4ck
Copy link
Collaborator

@aokj4ck aokj4ck commented Nov 17, 2024

Description

Correct behavior when writing an AutocompleteManufacturer model to perform modelContext.save() after an insert.

  • There is a @Attribute(.unique) constraint on the identifier: Int field :)
  • But when two models are created in quick succession, and not saved, then the uniqueness constraint is not enforced and the next save will fail :(

Screenshots

Before After
Simulator Screen Recording - iPhone 16 Pro - 2024-11-17 at 19 59 17 Simulator Screen Recording - iPhone 16 Pro - 2024-11-17 at 19 36 36

@aokj4ck aokj4ck merged commit ab3493c into main Nov 18, 2024
1 check failed
@aokj4ck aokj4ck deleted the fix/manufacturer-uniqueness branch November 18, 2024 01:29
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.

1 participant