refactor(meta): point ModelData at effective ModelId - #248
Merged
Conversation
- Remove MetaModelData tip SqlCompute so ModelId reads the stored effective FK. - Align loader fixtures with LookupEffectiveModel instead of bare First. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthrough
ChangesModel resolution
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
@SqlComputetip subquery (sqlModelId);ModelIdis again a physical ManyToOne FK to the effectivemeta_model.idwritten by the host loader.loaderTestModelIDatLookupEffectiveModelso fixtures match production resolve..dev/docs only (not in this PR).Test plan
./choysum test unit meta --be --pattern 'model_data|MetaModelData|parseMetaModelData'go test ./internal/module/evolution/data/ ./internal/module/lifecycle/ -count=1Made with Cursor
PR Type
Enhancement
Description
Go Core: Update loader test helper to
LookupEffectiveModel.TS Modules: Restore
ModelIdas physicalManyToOneFK column.License/SPDX: No new source files; no license impact.
Test Coverage: Updated Go and TypeScript unit tests.
File Walkthrough
loader_test.go
Update Go loader test helper to resolve effective modelinternal/module/evolution/data/loader_test.go
loaderTestModelIDhelper to usemeta.LookupEffectiveModelinstead of raw query.
behavior.
model_data_ref.test.ts
Update TypeScript unit tests for MetaModelData ModelIdmodules/meta/service/tests/model_data_ref.test.ts
@SqlComputetest assertions with checks for physical columnmetadata.
ModelIdis registered as aManyToOnefield andsqlModelIdisundefined.
model_data.ts
Restore ModelId field as physical ManyToOne relationmodules/meta/service/models/model_data.ts
sqlModelIdmethod and@SqlComputedecorator onModelId.ModelIdto a physicalManyToOneFK field targetingMetaModel.Summary by CodeRabbit