ID de retour sqlalchemy après insert
f = Foo(bar='x')
session.add(f)
session.flush()
print(f.id) # will return the obj id
Hafez
f = Foo(bar='x')
session.add(f)
session.flush()
print(f.id) # will return the obj id
session.flush()
print(f.id)