See this question.
It turns out that even without committing the transaction manually, before the TX is committed, the person has an ID after calling the save() meth
Between begintransaction and commit, after call save or update method, you should use:
EntityManagerHelper.getEntityManager().flush();
If you dont call it, the Object will be lost and cant be save to DB.
So after call it, you will take id of it in object.