Ash FrameworkAF
Ash Framework6mo ago
35 replies
Marco Dell'Olio

Access calculation from relation caluclation.

I got a resource A the defines
  calculate :access_count, :integer, Accounts.User.Calculations.AccessCount do
      public? true
    end


And I got resource B that want to expose the same field through the association
  calculate :access_count, :integer, expr(b.access_count) do
      public? true
      sortable? true
    end


Looks like I cannot do this, should I just define the original calculation in B instead?
Was this page helpful?