Skip to content

fix: repair broken has_one/belongs_to/through associations - #87

Merged
seuros merged 1 commit into
masterfrom
fix/associations-and-dedup
Jun 26, 2026
Merged

seuros merged 1 commit into
masterfrom
fix/associations-and-dedup

Conversation

@seuros

@seuros seuros commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Associations called phantom .where/.rel/.to on Pattern::Node and never worked. Rewrite on the real Pattern/Query API, fix :through declaration, add coverage. Extract shared helpers across cyrel + adapters.

ping @metkat

Can you review test this on your end. I moved files around to remove the logic/helper duplication.

@metkat

metkat commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

By eye it looks good to me, I like all the extracted utility functions! If it ends up causing problems I'm happy to help write tests.

@seuros

seuros commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

They are already tested.
I write code, test it, then refactor, test should not break.

I added test/relationships/singular_and_through_associations_test.rb , that the bug i found while refactoring.

I will fix some tests tomorrow and release a version.

…pers

Associations called phantom .where/.rel/.to on Pattern::Node and never
worked. Rewrite on the real Pattern/Query API, fix :through declaration,
add coverage. Extract shared helpers across cyrel + adapters.
@seuros
seuros force-pushed the fix/associations-and-dedup branch from ee7e79e to 89f1cdf Compare June 26, 2026 09:13
@seuros
seuros merged commit 20e7e44 into master Jun 26, 2026
3 checks passed
@seuros
seuros deleted the fix/associations-and-dedup branch June 26, 2026 12:08
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