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: properly define primary key #175

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

ctron
Copy link
Contributor

@ctron ctron commented Apr 17, 2024

To my understanding that should be a composite primary key:

.primary_key(
Index::create()
.col(PackageRelatesToPackage::LeftPackageId)
.col(PackageRelatesToPackage::Relationship)
.col(PackageRelatesToPackage::RightPackageId)
.col(PackageRelatesToPackage::SbomId),
)

And the docs seem to require the attribute for all fields of that key:

https://www.sea-ql.org/SeaORM/docs/generate-entity/entity-structure/#composite-key

@ctron ctron requested a review from bobmcwhirter April 17, 2024 09:14
@bobmcwhirter bobmcwhirter added this pull request to the merge queue Apr 17, 2024
Merged via the queue into trustification:main with commit f24287f Apr 17, 2024
3 checks passed
@ctron ctron deleted the feature/fix_primary_key_1 branch May 2, 2024 08:56
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