Looks like when you call the merge, the "flush" happens at the end of the
transaction. And the @PrePersist gets called through the transaction callback methods. As
a result your IllegalStateException gets wrapped into a RollbackException. Try this:
if (order.getId() != null) {
| entityManager.merge(order);
| //flush immidiately
| entityManager.flush();
| FacesUtil.addInfoMessage("Order Number: " + order.getOrderNumber() +"
was successfully updated.");
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157382#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...