after specifying the db.session.add, it is not actually sent to the database for execution. If you need to get the inserted id during session, you need to execute db.session.flush manually
is there any way to turn off this "feature" without manually performing any action that is automatically sent directly to the database server