The fix for ticket #500 breaks a pattern I've been using.

It's most likely an anti-pattern, but I don't see a way to get what I want
in SA otherwise.

I've got a series of "entities"

class Person():
   pass

class Manager(Person):
   def __init__(self):
       # do manager stuff
 
class Demigod(Person):
   def __init__(self):
       # do demigod stuff

etc.

there are mappers for each of these entities that inherit from Person(), so
all of the normal Person() properties exist, but Person() itself is not
polymorphic. That's on purpose, and because the class hierarchy of
Manager(), etc, is not exhaustive, and I occasionally
 want to save instances of Person() directly.
If I make the Person() class polymorphic on a column of say "typ", then SA
clears whatever "typ" I may have tried to set directly, and seems to make me
specify an exhaustive list of sub-types.

And so I leave Person() as non-polymorphic. I also have a collection of
Person() objects on a different mapper, which can load entity objects of any
type.

Before rev #2382, I could put a Manager() in a Person() collection, and
 it would flush OK. Now it bitches that it wants a real
 polymorphic mapper. I don't want to use a polymorphic
 mapper, because I don't want to specify an exhaustive list
 of every class that I'm ever going to use.

What to do?

Thanks,
Rick

--~--~---------~--~----~------------~-------~--~----~
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