Skip to content

Resolve models by configured table name - #111

Closed
nertzy wants to merge 1 commit into
rdy:masterfrom
nertzy:resolve-configured-table-name
Closed

Resolve models by configured table name#111
nertzy wants to merge 1 commit into
rdy:masterfrom
nertzy:resolve-configured-table-name

Conversation

@nertzy

@nertzy nertzy commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

FixtureBuilder currently infers a model class from each table name. This misses loaded models that configure self.table_name and can select a conventionally named model that actually points to a different physical table.

Resolve loaded Active Record models by their configured table ownership before writing fixture output. Model-backed extraction now preserves custom attribute serialization, while model-less and id-less tables continue using raw SQL. Ambiguous ownership raises a deterministic error instead of depending on model load order.

Fixes #109

@nertzy
nertzy force-pushed the resolve-configured-table-name branch from 663bbdc to 6d5a676 Compare September 4, 2026 22:57
@nertzy
nertzy force-pushed the resolve-configured-table-name branch from 6d5a676 to 0a0819e Compare September 4, 2026 23:15
@nertzy
nertzy changed the base branch from master to with-model-test-unit September 5, 2026 00:43
@nertzy
nertzy changed the base branch from with-model-test-unit to master September 5, 2026 00:43
@nertzy

nertzy commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #113 in the maintainer-owned stack.

@nertzy nertzy closed this Sep 5, 2026
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.

Resolve Active Record models by their configured table name

1 participant