What is the purpose of class_mapper? I can't find it in the .4 docs for the tutorials I'm looking at, yet when I don't call it as
https://svn.enthought.com/svn/enthought/sandbox/EnvisageSQLAlchemy/enthought/sqlalchemy/has_traits_orm.py notes, I get a AttributeError: # 'ColumnProperty' object has no attribute 'key' Is my setup incorrect that causes me to need class_mapper, while the . 4 docs don't include it? Or am I doing something different enough from the tutorials to require it? I'm running Python: 2.5.1 sqlite: 2.3.2 sqlalchemy 0.4.8 # create the database file and associated tables statsFile = Path('./stats.db') engine = create_engine('sqlite:///' + statsFile, echo=False) conn = engine.connect() metadata = MetaData(engine) self.createStatsTables(metadata) metadata.create_all(engine) # save tables (up to here works by looking at the database outside python using the sqlite3 command tool Session.configure(bind=engine) session = Session() class User(object): self.userName = '' user = User() user.userName = 'Joe' mapper(User, usersTable) class_mapper(User) # if I don't add this to the tutorial code, I get the error session.save(user) session.commit() --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---