When we query with "distinct", the array of objects returned doesn't fit the model but the ORM still tries and cast it. This is a problem.
We could implement a .distinct(field) at the manager level. This would give the benefit of being able to cast to the nested property type if needed.
A simpler approach would be to have a getRaw which would not try to build object or an option on the get method. (We might end up needing it anyway)
When we query with "distinct", the array of objects returned doesn't fit the model but the ORM still tries and cast it. This is a problem.
We could implement a
.distinct(field)at the manager level. This would give the benefit of being able to cast to the nested property type if needed.A simpler approach would be to have a
getRawwhich would not try to build object or an option on the get method. (We might end up needing it anyway)