On Jul 16, 2007, at 1:58 PM, [EMAIL PROTECTED] wrote:

> Storing just the base-most class would solve some (speed) issues, but
> others will remain - for each Class u'll have to do
>  1 get mapper for the Class
>  2 find the Base - the base-most mapper - or first concrete one
> towards root
>  3 constitute identity key from that and look it up.
> so it's 2 lookups + a hierarchy descent to the base.

for what operation, a get() ?   if you have Person->(Employee,  
Manager, Engineer, ...) the mapper.identity_key_from_instance()  
function will return (Person, (id,)) for all of those classes.  i.e.  
each class_mapper() will know what to do, and we wont even have the  
keys with the subclasses anymore.

>
> As for concrete-ism, while doing/supporting mixed inheritance in
> principle i found that concrete-table things behave like
> offsetted "roots", i.e. all things start a new from them. (sawrap:
> that's in make_klas_selectable() func + the big comment after it, as
> well in the as make_mapper ).

yes, if you have Person->Employee via joined, they both get a  
(Person, (id,)) id.  but if Manager is concrete, it gets (Manager,  
(id,)).





--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to