Hi,
When decoupling business from ORM model, dataclass passed to SA's 
imperative mapper *map_imperatively* will receive SA's internals like for 
example *_sa_instance_state* and *_sa_class_manager*.

I am wondering, what would be the best way to have "pure" dataclass, 
without SA internals? First thing to come to my mind is to perform query on 
SA *Table* and use dict/namedtuple to populate dataclass. Are there better 
approaches? I am in particular interested how this approach will behave 
with partial and composite updates? Any recipe to recommend?

Thank you in advance.

Kindest regards

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/324223bc-695d-4479-be32-b1a7c73e8a76n%40googlegroups.com.

Reply via email to