Hmm, If I do that then It doesn’t even compile:
== Compilation error in file lib/core/marketplace/markets/property.ex ==
** (Spark.Error.DslError) [Core.Marketplace.Markets.Property]
field_policies:
Missing field reference(s) in field policies: [:last_offer, :total_valid_offer, :non_rebuilt_favorite_count, :unique_view_count, :total_offers, :max_offer, :full_address, :offeror_current_offer, :favorite?, :total_unique_offers, :gross_profit, :average_offer, :street, :house_number, :city, :county, :state, :country, :type, :sub_type, :bedrooms, :bathrooms, :square_foot, :lot_size, :year_built, :ap_link, :cma_url, :description, :repairs, :price, :acquisition_price, :due_diligence_date, :status, :processing_status, :images, :external_id, :external_id_type, :metadata, :latitude, :longitude, :off_market, :view_count, :showing, :comment, :over_under_paid, :adj_mao, :opened_at, :normalized_full_address, :normalized_county, :normalized_state, ...]
If any field policies are present, *all* public, non-primary key fields must be accounted for.
To create a catch-all field policy that allows any fields that aren't covered
by other policies, use:
field_policy :* do
authorize_if always()
end
Keep in mind that all policies relevant to a given field must pass, so this will
not override other field policies.
(ash 3.4.8) /var/home/sezdocs/projects/rebuilt/platform/core/deps/spark/lib/spark/dsl/builder.ex:86: Ash.Policy.Authorizer.Transformers.AddMissingFieldPolicies.ensure_field_coverage/2
(spark 2.2.26) lib/spark/dsl/extension.ex:639: anonymous fn/4 in Spark.Dsl.Extension.run_transformers/4
(elixir 1.17.2) lib/enum.ex:4858: Enumerable.List.reduce/3
(elixir 1.17.2) lib/enum.ex:2585: Enum.reduce_while/3
/var/home/sezdocs/projects/rebuilt/platform/core/lib/core/marketplace/markets/property.ex:1: (file)
(stdlib 6.0.1) erl_eval.erl:904: :erl_eval.do_apply/7
(stdlib 6.0.1) erl_eval.erl:1192: :erl_eval.expr_list/7
(stdlib 6.0.1) erl_eval.erl:610: :erl_eval.expr/6
(stdlib 6.0.1) erl_eval.erl:1192: :erl_eval.expr_list/7
(stdlib 6.0.1) erl_eval.erl:610: :erl_eval.expr/6
(stdlib 6.0.1) erl_eval.erl:271: :erl_eval.exprs/6
(stdlib 6.0.1) erl_eval.erl:436: :erl_eval.expr/6
(spark 2.2.26) /var/home/sezdocs/projects/rebuilt/platform/core/lib/core/marketplace/markets/property.ex:1: Spark.Dsl.__before_compile__/1
:error