Skip to content

fix: honour a fields constraint when extracting a map field - #254

Merged
zachdaniel merged 1 commit into
ash-project:mainfrom
matt-beanland:fix/map-field-declared-type
Aug 21, 2026
Merged

fix: honour a fields constraint when extracting a map field#254
zachdaniel merged 1 commit into
ash-project:mainfrom
matt-beanland:fix/map-field-declared-type

Conversation

@matt-beanland

Copy link
Copy Markdown
Contributor

Contributor checklist

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Fixes ash-project/ash_postgres#832.
split_at_paths/4 recovered a field type for an embedded attribute but not for a fields constraint, so a declared field type was ignored and the value extracted untyped. A non string comparand then failed to encode.

Note that a string now carries an explicit ::text cast

Tests will be in an ash_postgres PR, which will require ash_sql to release to go green.

@matt-beanland
matt-beanland force-pushed the fix/map-field-declared-type branch from 01065c2 to b50e467 Compare August 21, 2026 14:21
@zachdaniel
zachdaniel merged commit ae112e6 into ash-project:main Aug 21, 2026
26 checks passed
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

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.

comparing a map field to an integer raises

2 participants