Zach Daniel
e3706c2552
improvement: use IO.warn
for allow_nil_inputs error
2024-06-10 17:53:35 -04:00
Zach Daniel
d5d0b04bb6
improvement: validate require_attributes
and allow_nil_input
at compile time
2024-06-10 17:43:15 -04:00
Zach Daniel
22b5c644b8
chore: select -> query.select
2024-06-10 15:27:10 -04:00
Zach Daniel
5d4c51015e
fix: only apply load through for attributes that are being selected directly
...
fix: ensure we lateral join with `from_many?: true` or any `:many` cardinality relationships
2024-06-10 15:23:26 -04:00
Zach Daniel
8dc0c2cb05
chore: remove ancient adapter code
2024-06-10 11:30:01 -04:00
Davide Briani
ae9671158f
fix: correctly load paginated relationships after create, update, delete ( #1229 )
...
Ensure that relationships can be correctly loaded, even with pagination,
on the resources resulting from create, update and delete actions.
Signed-off-by: Davide Briani <davide.briani@secomind.com>
2024-06-10 10:46:49 -04:00
Zach Daniel
46450f75e3
fix: return proper {:ok, value}
from Ash.Type.Atom.apply_constraints/2
2024-06-10 10:43:14 -04:00
Andreas Donig
4153ba7ef3
fix: fix the compare/2 implementations ( #1232 )
...
Co-authored-by: Andreas Donig <git@innwiese.de>
2024-06-10 08:15:51 -04:00
Robert Timis
6b964b9384
improvement: add tenant option to Ash.Seed.seed! ( #1230 )
2024-06-10 07:47:43 -04:00
dependabot[bot]
1f34fa9191
chore(deps): bump spark from 2.1.22 to 2.1.23 ( #1231 )
2024-06-07 19:02:59 -04:00
Zach Daniel
7f1849ca5c
fix: return proper value from short-circuit filter hydration
2024-06-07 10:44:10 -04:00
Robert Timis
9c32eab87e
fix: fix seed not working when :__keep_nil__ is generated using seed_input ( #1228 )
2024-06-07 08:14:39 -04:00
Robert Timis
4d35117649
fix: add resource to Ash.Seed.seed! in Ash.Generator.seed! ( #1227 )
2024-06-07 07:31:29 -04:00
Zach Daniel
1b4edfd066
chore: release version v3.0.10
2024-06-06 14:08:05 -04:00
Zach Daniel
17e34a2a27
fix: ensure that union types w/ explicit tags have constraints applied
2024-06-06 13:58:21 -04:00
Zach Daniel
459426135e
test: add example factory pattern for tests
2024-06-06 10:30:35 -04:00
dependabot[bot]
225fcf9199
chore(deps-dev): bump benchee from 1.3.0 to 1.3.1 ( #1226 )
2024-06-05 20:44:32 -04:00
Zach Daniel
e4980d55ba
fix: don't update tenant on update, instead enforce it
...
the attribute strategy allowed for overwriting the multitenant attribute
on update. In practice, this can't really happen using any standard pattern
because any record to be updated is read with the tenant context, but it still
represents a small risk (and `schema` based multitenancy would enforce it in this
way anyway, so this is more consistent).
2024-06-05 10:43:38 -04:00
Zach Daniel
51be60cb4b
improvement: detect invalid resources placed in relationships on domains verifier
2024-06-05 09:48:32 -04:00
Andreas Donig
7d10c781d4
fix: Do not compare nil values in compare
validation ( #1223 )
...
Co-authored-by: Andreas Donig <git@innwiese.de>
2024-06-05 09:23:33 -04:00
Zach Daniel
c9a7ac7ba9
improvement: warn at compile time on types that don't define atomic_update/2
2024-06-04 21:38:42 -04:00
Andreas Donig
58cc007ff5
docs: Fix a small mistake in the docs. ( #1222 )
...
Co-authored-by: Andreas Donig <git@innwiese.de>
2024-06-04 14:41:09 -04:00
Zach Daniel
3726f9b8b0
chore: List.wrap .load
call on calculations
2024-06-03 19:30:10 -04:00
Zach Daniel
8799191165
test: add tests showing before_transaction
hooks setting derived values
2024-06-02 11:59:18 -04:00
Zach Daniel
a3e3e8701f
fix: ensure context is properly set on bulk manual action invocations
...
closes #1217
2024-06-02 11:44:15 -04:00
Zach Daniel
a35d4b2b6f
docs: fix docs rendering issues
2024-05-31 10:28:25 -05:00
Zach Daniel
77f6c9526d
chore: release version v3.0.9
2024-05-31 09:48:53 -05:00
Zach Daniel
e47ceafc41
chore: update to new assets format in ex_doc
2024-05-31 09:48:20 -05:00
dependabot[bot]
fba3287ddb
chore(deps-dev): bump ex_doc from 0.33.0 to 0.34.0 ( #1215 )
...
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc ) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases )
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md )
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.33.0...v0.34.0 )
---
updated-dependencies:
- dependency-name: ex_doc
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-31 09:39:50 -05:00
Riccardo Binetti
d71718c691
fix: use correct boolean operation names in Filter.find/4 ( #1214 )
2024-05-30 07:59:11 -05:00
Zach Daniel
fbcafa1bfa
fix: when hydrating nested aggregates, use correct related resource/path pair
...
closes #1213
2024-05-30 00:12:12 -05:00
dependabot[bot]
4910bf9d6d
chore(deps): bump stream_data from 1.0.0 to 1.1.0 ( #1212 )
2024-05-29 19:49:51 -04:00
Zach Daniel
4ab37a18f5
chore: fix 1.17 warning
2024-05-29 17:07:30 -04:00
Zach Daniel
2a304a581b
fix: check if in transaction before trying to roll it back
2024-05-29 15:21:08 -04:00
Zach Daniel
1c21e390be
fix: retain ref_path
when authorizing aggregates
2024-05-29 14:03:33 -04:00
Zach Daniel
e9897eb50f
fix: ensure that belongs_to relationships are properly not reloaded with lazy?: true
...
closes #1208
2024-05-29 12:59:10 -04:00
Zach Daniel
49b69628f8
improvement: compatibility with elixir 1.17
2024-05-29 09:20:44 -04:00
Riccardo Binetti
421905c163
docs: add pagination guide in advanced topics ( #1113 )
2024-05-29 07:35:34 -04:00
Jechol Lee
99cc10a9c7
Ash.can? to be boolean | no_return ( #1210 )
2024-05-29 07:32:32 -04:00
Jechol Lee
5dbf8fc0ed
fix get_domain ( #1209 )
2024-05-29 07:31:18 -04:00
Zach Daniel
2d9ffe7fab
fix: implement rollback on after hooks for bulk actions
2024-05-28 14:57:49 -04:00
Zach Daniel
acbe60a9b4
chore: release version v3.0.8
2024-05-28 14:33:36 -04:00
Zach Daniel
bfdb8f9bab
chore: format
2024-05-28 14:32:30 -04:00
Zach Daniel
4b873438dd
fix: missing else
caused manual updates not to work with bulk_update
...
closes #1205
2024-05-28 14:30:41 -04:00
Zach Daniel
d1736a109b
docs: fix miscommunication in upgrade guide
2024-05-28 14:23:28 -04:00
dependabot[bot]
f2bfc51988
chore(deps): bump reactor from 0.8.3 to 0.8.4 ( #1207 )
2024-05-27 19:37:37 -04:00
Alan Heywood
2ee311b061
test: demonstrate error with bulk update on manual action ( #1204 )
...
The following error is produced
1) test manual updates are supported (Ash.Test.Actions.BulkUpdateTest)
test/actions/bulk/bulk_update_test.exs:358
** (CaseClauseError) no case clause matching: nil
code: |> Ash.bulk_update!(:update_manual, %{},
stacktrace:
(ash 3.0.7) lib/ash/actions/update/bulk.ex:2076: anonymous fn/11 in Ash.Actions.Update.Bulk.run_batch/10
(elixir 1.16.2) lib/enum.ex:1264: anonymous fn/3 in Enum.flat_map/2
(stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
(elixir 1.16.2) lib/enum.ex:2540: Enum.flat_map/2
(ash 3.0.7) lib/ash/actions/update/bulk.ex:1966: Ash.Actions.Update.Bulk.run_batch/10
(ash 3.0.7) lib/ash/actions/update/bulk.ex:1505: Ash.Actions.Update.Bulk.do_handle_batch/13
(ash 3.0.7) lib/ash/actions/update/bulk.ex:1042: anonymous fn/12 in Ash.Actions.Update.Bulk.do_stream_batches/7
(elixir 1.16.2) lib/stream.ex:613: anonymous fn/4 in Stream.map/2
(elixir 1.16.2) lib/stream.ex:1816: anonymous fn/3 in Enumerable.Stream.reduce/3
(elixir 1.16.2) lib/stream.ex:273: anonymous fn/4 in Stream.chunk_while_fun/2
(elixir 1.16.2) lib/stream.ex:1159: anonymous fn/3 in Stream.with_index/2
(elixir 1.16.2) lib/stream.ex:1079: Stream.do_transform_each/3
(elixir 1.16.2) lib/stream.ex:1816: anonymous fn/3 in Enumerable.Stream.reduce/3
(elixir 1.16.2) lib/enum.ex:4839: Enumerable.List.reduce/3
(elixir 1.16.2) lib/stream.ex:1027: Stream.do_transform_inner_list/7
(elixir 1.16.2) lib/stream.ex:1828: Enumerable.Stream.do_each/4
(elixir 1.16.2) lib/stream.ex:1052: Stream.do_transform_inner_enum/7
(elixir 1.16.2) lib/stream.ex:1828: Enumerable.Stream.do_each/4
(elixir 1.16.2) lib/stream.ex:943: Stream.do_transform/5
(elixir 1.16.2) lib/enum.ex:4396: Enum.reverse/1
(elixir 1.16.2) lib/enum.ex:3728: Enum.to_list/1
(ash 3.0.7) lib/ash/actions/update/bulk.ex:1070: Ash.Actions.Update.Bulk.run_batches/3
(ash 3.0.7) lib/ash/actions/update/bulk.ex:386: Ash.Actions.Update.Bulk.run/6
(ash 3.0.7) lib/ash.ex:2209: Ash.bulk_update!/4
test/actions/bulk/bulk_update_test.exs:373: (test)
2024-05-27 10:32:39 -04:00
Zach Daniel
6de8e765a9
improvement: verify notifiers all use the Ash.Notifier
behaviour
2024-05-26 13:00:15 -04:00
Rebecca Le
8cf10b1a8d
docs: Remove duplicate link to mnesia in DSL docs ( #1201 )
2024-05-26 07:34:41 -04:00
Zach Daniel
b5dce2494a
chore: optimize strict check fact checking
2024-05-24 23:07:46 -04:00