When an entity with generated id is inserted and deleted in the same transaction and flush mode is set to COMMIT, NPE is thrown:
Attaching reproducer (fails with master = 5.3.0-SNAPSHOT, rev. 69000ddc165ca0aba13ac950b2637974e018c4fb).