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

Use composite primary key as part of data Unique record #1433

Closed
sergesku opened this issue Oct 26, 2022 · 1 comment
Closed

Use composite primary key as part of data Unique record #1433

sergesku opened this issue Oct 26, 2022 · 1 comment

Comments

@sergesku
Copy link
Contributor

Currently, the composite primary key is not part of the data Unique record.
Perhaps it makes sense to add a composite primary key as an additional constructor.

Then

UserAddress
  user  UserId
  address  AddressId

  Primary user address

will generate

data Unique UserAddress = UniquePrimaryUserAddress UserId AddressId
@sergesku sergesku changed the title Use composite master key as part of data Unique record Use composite primary key as part of data Unique record Oct 26, 2022
@parsonsmatt
Copy link
Collaborator

This was implemented with #1383 and was released with 2.14.

Feel free to reopen if that's not doing what you expected 😄

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

No branches or pull requests

2 participants