333435363738394041424344
private Item item; @CommitAfter void onCreateEntity() { final Item item = new Item(); item.setName("name"); entityManager.persist(item); this.item = item; }
private Item item; @CommitAfter void onCreateEntity() { final Item item = new Item(); item.setName("name"); dao.persist(item); this.item = item; }
323334353637383940414243
555657585960616263646566
} @CommitAfter void onCreateItem() { final Item item = new Item(); item.setName("Bar Item"); entityManager.persist(item); this.item = item; }