passed most tests (including transactional), but not the thread case
temperaly save, now the thread case works
passed all tests (including transacation), except the reference issue still exist