make sure to flush the tx so that we get the entityexistsexception