Hook function in Ecto.Schema to set virtual fields when querying a Schema struct from the data store

Fair enough.

I defined a function in the schema that adds the virtual fields and now I am piping/mapping all the instances of the Schama struct to it when one of the Phoenix contexts queries/preloads them.

Thanks to all

1 Like