There is data family EntityField ent typ which is defined in class PersistEntity ent.
I should use it in Filters, SelectOpts and so on. But I can't find a way to get it at runtime. I need something like
data SomeEF e = forall typ. SomeEF { unSomeEF :: EntityField e typ }
and
getEntityFields :: PersistEntity e => e -> [SomeEF]
I need it for instance to make possibility for user define filters or orders dynamically.
Is there exists somewhere?