logoalt Hacker News

frevibtoday at 7:19 PM0 repliesview on HN

You shouldn’t use ORM entities as domain models. The domain should not depend on anything from the integration layer (db entities, REST request/ response, etc).

Ideally models are generated from SQL schemas, which you map to domain models.