the raw SQL to ORM mapping pattern has a lot of limitations but it is 
documented at 
https://docs.sqlalchemy.org/en/20/orm/queryguide/select.html#getting-orm-results-from-textual-statements
 .



On Thu, Aug 17, 2023, at 4:26 PM, Mike Graziano wrote:
> To all,
> 
> I am new to Python and SQLAlchemy.  I was a Java developer who used the 
> MyBatis ORM.  I was using PONY ORM for a while, but was concerned that 
> SQLAlchemy is the gold standard for ORMs and Python, but there is something 
> about MyBatis that I can't seem to find in SQLAlchemy, but maybe I have not 
> googled enough.
> 
> In short, I don't want to use SQLAlchemy's select.  I want to issue raw SQL 
> and have SQLAlchemy's ORM capability populate a collection of objects.  That 
> may not be pythonic, but I'd like to know how to do it with declarative 
> mapping.  Is it possible and, if so, I'd love to see an example.  
> 
> Thx & rgds
> 
> mjg
> 
> 
> -- 
> 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/17383085-4a83-49d0-bf0a-1653552b7d59n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy/17383085-4a83-49d0-bf0a-1653552b7d59n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/ef34613f-69ab-4110-b756-74325b44a224%40app.fastmail.com.

Reply via email to