Given this piece of code:
record = session.query(Foo).filter(Foo.id == 1).first()   
session.delete(record)
session.flush()
has_record = session.query(Foo).filter(Foo.id == 1).first()
I think the 'has_record' should be None here, but it turns out to be the same row as record.
Did I miss something to get the assumed result. Or is there any way that can make the delete take effect without commit?
Mysql would behave in a different way under similar process.
start transaction;
select * from Foo where id = 1;  # Hit one record
delete from Foo where id = 1;    # Nothing goes to the disk
select * from Foo where id = 1;  # Empty set
commit;                          # Everything geos to the disk