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

refactor: set all inverse edges to allow multiple parents #64

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

jhoward-lm
Copy link
Contributor

This PR removes the unique option from all inverse/from edges, meaning a child entity may now always belong to potentially multiple owners/parents. This is to allow proto messages in the database to be reused if the wire-format bytes of the message are identical.

Depends on #63

Note

Only the following files are manually modified; the rest are auto-generated

  • backends/ent/*.go
  • internal/backends/ent/schema/*.go

Miscellaneous

  • move mixin schemas into separate package
  • remove DocumentMixin, more duplicated code but better clarity
  • fix cardinality of Metadata --> SourceData edge

/cc @ashearin @lmphil @pkwiatkowski1 @Strakeln @jmayer-lm @EphraimEM

@jhoward-lm jhoward-lm added enhancement New feature or request go Pull requests that update Go code labels Jan 21, 2025
@jhoward-lm jhoward-lm self-assigned this Jan 21, 2025
puerco
puerco previously approved these changes Jan 23, 2025
@jhoward-lm
Copy link
Contributor Author

@puerco just a heads up, since #63 needs to be merged first, I think your approval on this one will get cleared once it's rebased

@jhoward-lm jhoward-lm dismissed puerco’s stale review January 24, 2025 17:53

The merge-base changed after approval.

@jhoward-lm jhoward-lm force-pushed the non-unique-inverse-edges branch from c774aac to aa8eb20 Compare January 24, 2025 17:53
@puerco
Copy link
Member

puerco commented Jan 24, 2025

Ready 👍

@jhoward-lm jhoward-lm merged commit 84ecb69 into protobom:main Jan 24, 2025
2 checks passed
@jhoward-lm jhoward-lm deleted the non-unique-inverse-edges branch January 24, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants