Assuming you are using declarative, this is okay (
https://docs.sqlalchemy.org/en/14/orm/mapping_api.html?#sqlalchemy.orm.Mapper
)

Note this line:
  A class which was mapped by the sqlalchemy.ext.declarative 
<https://docs.sqlalchemy.org/en/14/orm/extensions/declarative/api.html#module-sqlalchemy.ext.declarative>
 extension will also have its mapper available via the __mapper__ attribute.

Mike generally doesn't change things once they're stated in the docs.

If you're not using declarative, it will probably be okay. Those things 
don't typically change.  If they do, you can easily grab the mapper in your 
property with something like this:

sqlalchemy.orm.class_mapper(self.__class__).relationships 

-- 
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/6a39b653-0139-4968-b6aa-c671769262cf%40googlegroups.com.

Reply via email to