mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
Revert "chore: fix compiling embedded types (why??)"
This reverts commit d7ef5efbb2
.
This commit is contained in:
parent
28a4429b9e
commit
21e52bebbd
1 changed files with 0 additions and 11 deletions
|
@ -22,8 +22,6 @@ defmodule Ash.Schema do
|
|||
for attribute <- Ash.Resource.Info.attributes(__MODULE__) do
|
||||
read_after_writes? = attribute.generated? and is_nil(attribute.default)
|
||||
|
||||
Ash.Schema.require_type(attribute.type)
|
||||
|
||||
field(attribute.name, attribute.type,
|
||||
primary_key: attribute.primary_key?,
|
||||
read_after_writes: read_after_writes?,
|
||||
|
@ -37,7 +35,6 @@ defmodule Ash.Schema do
|
|||
|
||||
for aggregate <- Ash.Resource.Info.aggregates(__MODULE__) do
|
||||
{:ok, type} = Aggregate.kind_to_type(aggregate.kind, :string)
|
||||
Ash.Schema.require_type(type)
|
||||
|
||||
field(aggregate.name, type, virtual: true)
|
||||
|
||||
|
@ -52,7 +49,6 @@ defmodule Ash.Schema do
|
|||
|
||||
for calculation <- Ash.Resource.Info.calculations(__MODULE__) do
|
||||
{mod, _} = calculation.calculation
|
||||
Ash.Schema.require_type(calculation.type)
|
||||
|
||||
field(calculation.name, calculation.type, virtual: true)
|
||||
|
||||
|
@ -81,8 +77,6 @@ defmodule Ash.Schema do
|
|||
for attribute <- Ash.Resource.Info.attributes(__MODULE__) do
|
||||
read_after_writes? = attribute.generated? and is_nil(attribute.default)
|
||||
|
||||
Ash.Schema.require_type(attribute.type)
|
||||
|
||||
field(attribute.name, attribute.type,
|
||||
primary_key: attribute.primary_key?,
|
||||
read_after_writes: read_after_writes?,
|
||||
|
@ -97,7 +91,6 @@ defmodule Ash.Schema do
|
|||
for aggregate <- Ash.Resource.Info.aggregates(__MODULE__) do
|
||||
{:ok, type} = Aggregate.kind_to_type(aggregate.kind, :string)
|
||||
|
||||
Ash.Schema.require_type(type)
|
||||
field(aggregate.name, type, virtual: true)
|
||||
|
||||
struct_fields = Keyword.delete(@struct_fields, aggregate.name)
|
||||
|
@ -112,7 +105,6 @@ defmodule Ash.Schema do
|
|||
for calculation <- Ash.Resource.Info.calculations(__MODULE__) do
|
||||
{mod, _} = calculation.calculation
|
||||
|
||||
Ash.Schema.require_type(calculation.type)
|
||||
field(calculation.name, calculation.type, virtual: true)
|
||||
|
||||
struct_fields = Keyword.delete(@struct_fields, calculation.name)
|
||||
|
@ -127,7 +119,4 @@ defmodule Ash.Schema do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def require_type({:array, type}), do: require_type(type)
|
||||
def require_type(type), do: type.type()
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue