“You can use a @property so that when you get back an A or a B object , they 
seek to return either the column on A or the column on B.“

I believe you’re describing the behavior I currently have, I.e. if I query B 
then I can get b.visible_id otherwise I get A.visible_id. 

I see your point about efficiency, but I think I’m already doing this sort of 
join under the hood because I’m using GraphQL to query all A and then pulling 
attributes on subclasses of A depending on the type. 

I’m fine with eliminating visible_id from all subclasses, though, but I’d like 
separate numbering for each subclass. 

Is it possible to specify the sequence to use per class when persisting the 
entities or do you have a method for that which you recommend?

If not, can you tell me how to do the mapping with coalesce and I’ll stress 
test it to see if it will work performance wise?

-- 
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/2348bb1b-df75-46aa-b43a-458a13d37f99%40googlegroups.com.

Reply via email to