Hi! I have base class (Bas) and derived one (Der). First is mapped. I wanted second to use the same mapping but got exception: AttributeError: 'NoneType' object has no attribute 'set' . But if i add Bas class init before Der class init no exception is raised!
Code ################################## from sqlalchemy.orm import mapper from sqlalchemy import Table, Column, Integer, MetaData metadata = MetaData() table = Table('tableee', metadata, Column('id', Integer, primary_key=True), Column('fff', Integer), ) class Bas(object): def __init__(self): self.fff = 0 class Der(Bas): def __init__(self): super(Der, self).__init__() mapper (Bas, table) #hand = Bas() # if i uncomment this line everything works hand = Der() ##################################### Adding mapper (Der, table) works as well but i dont think it's good solution --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---