---
title: "Comment by Kiriti Badam on \"Persistence and domain model separation using SQLAlchemy ORM\" | Hashnode"
description: "Thanks for writing this detailed blog. Have you given any thoughts about definition of a translation layer without the mapper? For example, if I have a dataclas"
url: "https://hashnode.com/posts/persistence-and-domain-model-separation-using-sqlalchemy-orm/61a3f6da2be89f3d0ab9ed59/comment/6409a00e6b5ccef6ff20efd7"
---

[Discussion](https://hashnode.com/posts/persistence-and-domain-model-separation-using-sqlalchemy-orm/61a3f6da2be89f3d0ab9ed59)

Comment [Persistence and domain model separation using SQLAlchemy ORM](https://hashnode.com/posts/persistence-and-domain-model-separation-using-sqlalchemy-orm/61a3f6da2be89f3d0ab9ed59)

[Kiriti Badam](https://hashnode.com/@kiritibadam)

[Mar 9, 2023](https://hashnode.com/posts/persistence-and-domain-model-separation-using-sqlalchemy-orm/61a3f6da2be89f3d0ab9ed59/comment/6409a00e6b5ccef6ff20efd7)

Thanks for writing this detailed blog. Have you given any thoughts about definition of a translation layer without the mapper? For example, if I have a dataclass in the domain model but I want to store that dataclass as a JSON in the persistence model.

[jorzel](https://hashnode.com/@jorzel)

[Mar 9, 2023](https://hashnode.com/posts/persistence-and-domain-model-separation-using-sqlalchemy-orm/61a3f6da2be89f3d0ab9ed59/comment/6409a00e6b5ccef6ff20efd7#reply-6409aa5f6b5ccef6ff20f254)

Maybe I have a useful example: [github.com/jorzel/recruitment/blob/main/src/infra…](https://github.com/jorzel/recruitment/blob/main/src/infrastructure/db/sqlalchemy/orm.py.) This `data` field under `StoredEvent` could be a dataclass. Instead of using a mapper (and ORM), you can exploit raw SQL (or document insert/update procedure) within infrastructure repository implementation.
