1 Comment
User's avatar
User's avatar
Comment removed
Jan 14
Comment removed
Andrey Fadeev's avatar

Yeah, the defining domain model is always a challenge and I think depends on the project. In my case, on a project I was working recently, I defined in the shared domain model entities that will go to the outside (eg in the API responses), so I can map various SQL record types to the domain model and only define JSON encoding/decoding for a small subset of data.

But on the backend or in tests, it's usually just fine to use SQL generated types IMO.