How does an entity get an ID before a transaction is committed in JPA/Play? <p><a href="http://stackoverflow.com/questions/8169279/how-can-i-commit-a-play-jpa-transaction-manually">See this question</a>.</p> <p>It turns out that even without committing the transaction manually, before the TX is committed, the person has an ID after calling the save() method.</p> <p>Isn't the database responsible of assinging the ID field? If so, how can the ID field be filled before commit? Does any communication with the DB occur before the TX is committed?</p>