On Feb 27, 2011, at 1:23 PM, Chris Withers wrote:

> Hi All,
> 
> I'm reading 
> http://www.sqlalchemy.org/trac/browser/examples/versioning/history_meta.py?rev=7253:3ef75b251d06
>  and I'm curious about the following in line 112-114:
> 
> - what does iterate_to_root do?

return the hierarchy of mappers starting at the sub-most subclass.    
equivalent to class.__mro__ for mappers.

> 
> - why do we need to iterate over the object mappers and the history mappers?

we're working on individual mapped Table instances in that function so the set 
of all Table objects for a hierarchy is [m.local_table for m in 
m.iterate_to_root()]

> 
> - what does hm.single indicate?

the mapper is a "single table inheritance" mapper and does not have its own 
local_table.


> 
> cheers,
> 
> Chris
> 
> -- 
> Simplistix - Content Management, Batch Processing & Python Consulting
>           - http://www.simplistix.co.uk
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to