How to load a limited amount of related records (and maybe store as virtual attr?)
Still pretty new to Ash and ran into some issues yesterday getting some data into my liveview. What I want to do is load a relationship when I fetch a collection of records, but only take the most recently inserted record. That would then either be accessed as something like a 'virtual field' on the main record or through the relationship (not sure what's best). How would I accomplish this?
E.g. a
I tried something like the below but it was not valid--
E.g. a
Document :has_many :stats, and I want to load the accompanying, most recent Stat only (for each Document) whenever I fetch a Document collection.I tried something like the below but it was not valid--
