It is possible currently to fetch on an attribute with is destined to be converted an an enum value:
Animal.request().all().where(\.type == AnimalType.duck.rawValue)
It would be nice to be able to remove the boilerplate.
Animal.request().all().where(\.type == .duck)
To do so, maybe the Predicate struct should hold another generic DatabaseModel type since the mapping from a raw value to a enum is known in the model.