Oh.. Yes, sorry. That's my mistake, because testing engine created
MyISAM tables (they were default) and it broke the tests.

Thanks!

On May 7, 12:39 am, "Michael Bayer" <[email protected]> wrote:
> are you using MyISAM tables ?
>
> naktinis wrote:
>
> > I have a session created this way:
> > Session = scoped_session(sessionmaker(autoflush=True,
> > transactional=True))
>
> > Then I have this piece of code:
> > print User.query().count()
> > u = User(name='Jim')
> > Session.flush([u])
> > print User.query().count()
> > Session.rollback()
> > Session.clear()
> > print User.query().count()
>
> > Which outputs:
> > 0
> > 1
> > 1
>
> > What am I doing wrong? Why is the new user still in session?
>
>
--~--~---------~--~----~------------~-------~--~----~
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