Ah, I see what you mean. Yep, that would work perfectly for me. It would
mean that I would need to set up a mapper for every subclass, but that
is no great hardship (I was half-imagining just mapping the base class,
but that probably has other implications)

Cheers,

Simon

Micheal Bayer wrote:
im thinking it would just return the string (or whatever) value that would match the key inside your polymorphic_map. so the polymorphic map would have a 1->1 key->class mapping, but this function would allow you to do translations from whatever is in the result set (like regexps or whatever).

On Jan 15, 2007, at 5:56 AM, King Simon-NFHD78 wrote:

>
> Micheal Bayer wrote:
>> id rather just add another plugin point on MapperExtension for this, >> which takes place before the "polymorphic" decision stage at >> the top of the _instance method, like get_polymorphic_identity(). >> that way you could do all of this stuff cleanly in an extension (and >> id do that instead of making polymorphic_identity into a list). hows >> that sound?
>
> That would be ideal for me, and would seem to be the most flexible > solution as well - it leaves the decision for which class to use up to > the application. What would it actually return, though? An instance > ready to be populated?
>
> Thanks a lot,
>
> Simon
>
> >


>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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