Is elixir obsolete?

My sqlalchemy is 0.6.3 and the elixir is 0.7.1

I created a model class that extends Entity :

 from elixir import * class User(Entity): pass 

And save the user as:

 user = User() user.save() 

Session has no attribute 'save' reported

I looked at the elixir code, found that it calls sqlalchemy.org.session.Session#save() , but there is no save() method there.

So, the obsolete elixir , and we should no longer use it?

+4
source share
2 answers

I use the same versions of SQLAlchemy and Elixir, which is definitely compatible. Not sure what you are trying to do with the code above.

+1
source

Remember to call setup_all (True) before doing anything with a session or request. This will make the necessary ORM mappings for the session, and the request will work correctly.

+1
source

All Articles