You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the example on the documentation page seems to be easy to run, but somehow I'm not getting it. Could someone show me, what I'm doing wrong?
importsqlalchemyassafromsqlalchemy.ext.declarativeimportdeclarative_basefromsqlalchemy.ormimportsessionmakerfromsqlalchemyimportcreate_enginefromsqlalchemy_continuumimportmake_versionedengine=create_engine('sqlite:////tmp/test.sql', echo=True)
Base=declarative_base()
make_versioned()
classArticle(Base):
__versioned__= {}
__tablename__='article'id=sa.Column(sa.Integer, primary_key=True, autoincrement=True)
name=sa.Column(sa.Unicode(255))
content=sa.Column(sa.UnicodeText)
# after you have defined all your models, call configure_mappers:sa.orm.configure_mappers()
Base.metadata.create_all(bind=engine)
Session=sessionmaker(bind=engine)
session=Session()
article=Article(name=u'Some article')
session.add(article)
session.commit()
The error I'm getting ist the following: sqlalchemy_continuum.exc.ImproperlyConfigured: Could not build relationship between Transaction and User. User was not found in declarative class registry. Either configure VersioningManager to use different user class or disable this relationship
Thanks for your anwsers in advance. Peter
The text was updated successfully, but these errors were encountered:
Hello,
the example on the documentation page seems to be easy to run, but somehow I'm not getting it. Could someone show me, what I'm doing wrong?
The error I'm getting ist the following:
sqlalchemy_continuum.exc.ImproperlyConfigured: Could not build relationship between Transaction and User. User was not found in declarative class registry. Either configure VersioningManager to use different user class or disable this relationship
Thanks for your anwsers in advance. Peter
The text was updated successfully, but these errors were encountered: