Closed VaZark closed 2 years ago
Thanks! That was exactly what I needed.
The custom active model seems like the closest thing to a Serializer
from Django/DRF.
Do you reckon that each Model can have a Model.asInputModel()
that autogenerates the base model just without the field marked as _primarykey as default?
The concept of InputModel has been discussed in #101
The following code fails when used as the
id
field is not part of theInputTask
.Is there a way to useDefault::default()
for an entity model whentransforming
from another Struct defined for input type. I'm trying to create a generic From so that I can reuse the idea with different modelsBasically I want to avoid doing the below transformation as a part of the application logic