Skip to content

Added dynamic model crosswalk associations - fixes #1399 - #1404

Merged
philayres merged 1 commit into
consected:developfrom
hmsrc:dynamic-model-crosswalk-1399
Sep 3, 2026
Merged

Added dynamic model crosswalk associations - fixes #1399#1404
philayres merged 1 commit into
consected:developfrom
hmsrc:dynamic-model-crosswalk-1399

Conversation

@philayres

@philayres philayres commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Support dynamic models associated to masters through msid, pro_id, pro_info_id, and contact_id.
  • Keep the dynamic model primary key independent from the masters-side join key.
  • Preserve deliberately configured foreign keys when existing tables also contain master_id.
  • Validate foreign-key column compatibility using Rails-normalized types, accepting equivalent integer and string database types.
  • Update scoping and admin documentation and add model/view regression coverage.

Validation

  • bundle exec rspec spec/models/definition_scoping_spec.rb spec/views/masters/_dynamic_model_blocks_crosswalk_spec.rb
  • Result: 23 examples, 0 failures.
  • Coverage includes compatible integer/bigint variants and rejection of incompatible foreign-key types for crosswalk and external-ID associations.
  • git diff --check

Fixes #1399

@philayres
philayres force-pushed the dynamic-model-crosswalk-1399 branch 3 times, most recently from 9765dff to 1490ef0 Compare September 3, 2026 14:36
@philayres
philayres force-pushed the dynamic-model-crosswalk-1399 branch from 1490ef0 to 254f893 Compare September 3, 2026 15:22
@philayres
philayres merged commit 585b6d4 into consected:develop Sep 3, 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.

Associate a dynamic model to master records through a masters crosswalk column

1 participant