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

Make all relationships spec fields mandatory #34

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

oriolgual
Copy link
Contributor

At the moment, we're deciding that if a given relationship doesn't have a primary_key, we fallback to :id. This can lead to unwanted behaviour and surprises from developers.

Let's make it mandatory and ensure everything is present.

At the moment, we're deciding that if a given relationship doesn't have
a `primary_key`, we fallback to `:id`. This can lead to unwanted behaviour
and suprises from developers.

Let's make it mandatory and ensure everything's present.
Copy link

@RubenMZ RubenMZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@somebody32
Copy link

👏

private

sig { void }
def validate_spec!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have a class that defines all these, and raise these errors when instantiating it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it but it seemed overkill for now.

Copy link
Contributor

@gtrias gtrias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@oriolgual oriolgual merged commit 8aea57c into main Feb 10, 2025
1 check passed
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.

5 participants