This would go against the JPA spec unfortunately. On 02 Apr 2014, at 16:25, Gunnar Morling <gun...@hibernate.org> wrote:
> Hi, > > Working on a demo for OGM, I tried to apply Bean Validation constraints to > my entities and have them automatically validated during the persistence > lifecycle. > > This works as expected (which is very nice), the only thing which made me > wonder is that the resulting ConstraintViolationException is wrapped into a > RollbackException. Basically that's not surprising as we use TX demarcation > to control the flush cycle also if the store is actually non-transactional, > yet it may cause irritations and false expectations by users. > > So I'm wondering whether we rather should raise a more generic > PersistenceException (or another specialized type which doesn't indicate a > rollback may happen) when using a non-transactional backend? What do you > think? > > --Gunnar > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev