Hi there,

I have some (declarative, polymorphic) classes that use single-table
inheritance. My configuration is similar to the below:

class BasicObject(Base):
   col1 = Column(…)
   # discriminator, polymorphic setup etc

class ObjectOne(BasicObject):
  col2 = Column(…)
  col3 = Column(…)

class ObjectTwo(BasicObject):
  col2 = Column(…) # <-- This is the same as col2 on ObjectOne
  col4 = Column(…)

Previously, this worked fine in SA 0.5, but in 0.6 it raises an
ArgumentError telling me it conflicts. For the moment, I have just
moved these properties to the `BasicObject`, but that's not really
where they should be. I have additional classes of `BasicObject` that
shouldn't have that `col2` attribute.

Is there a way I can get around this (and essentially declare them
twice on the same table?). I know I could probably set them as
different database columns and keep them as the same attribute on the
mapper, but I really need the ability to query against that column
across the different mappers (without having to do an OR). Is there a
way around this?

Any help would be appreciated :)

Thanks,
Oliver

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