chore: update docs showing map values for composite types

This commit is contained in:
Zach Daniel 2023-11-29 10:23:10 -05:00
parent 51b02c6459
commit 198b290b10
2 changed files with 2 additions and 2 deletions

View file

@ -834,7 +834,7 @@ defmodule Ash.Actions.Read do
if multitenancy_attribute && query.tenant do
{m, f, a} = Ash.Resource.Info.multitenancy_parse_attribute(query.resource)
attribute_value = apply(m, f, [query.tenant | a])
Ash.Query.filter(query, [{multitenancy_attribute, attribute_value}])
Ash.Query.filter(query, ref(^multitenancy_attribute) == ^attribute_value)
else
query
end

View file

@ -156,7 +156,7 @@ defmodule Ash.Type do
And you can also *construct* composite types in expressions, for example:
```elixir
calculate :coordinates, :composite_point, expr(composite_type({some_value, some_other_value}, Point))
calculate :coordinates, :composite_point, expr(composite_type(%{x: some_value, y: some_other_value}, Point))
```
"""