ash-project / ash_sql

A library containing some shared Ecto-based sql data layer functionality.
MIT License
4 stars 8 forks source link

fix: use period notation to access aggregate context fields #30

Closed ahey closed 4 months ago

ahey commented 4 months ago

In some circumstances, the aggregate context is a struct and so we cannot use bracket notation. Using period notation works when the context is either a struct or a map. I noticed this is while upgrading one of my projects to ash 3. I wasn't able to reproduce it in an ash_postgres test, however it's occurring in my codebase. This change does not break any tests in the ash_postgres test suite when it's configured to use this patched ash_sql.