Question on JtaQuery

2016-07-12 Thread Felipe Jaekel
Hi, I have the following method on my JPA base DAO: protected int executeUpdate(final Query... queries) { int total = 0; try { beginTransaction(); for(final Query query : queries) { total += query.executeUpdate(); if(isLoggable()) { LogService.logUpdate(em, query, getPersistentClass().getSimpl

Re: Question on JtaQuery

2016-07-12 Thread Romain Manni-Bucau
Hi do you mix query usage outside and inside a tx? I think the wiser is to choose one of both but not mixing it to avoid issues. Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog

Re: Question on JtaQuery

2016-07-12 Thread Felipe Jaekel
I was creating the query and setting the parameters on child DAOs and executing the transaction on the base DAO. I'll change the base DAO method to receive the JPQL string and a parameter map instead of the query. Thanks 2016-07-12 11:36 GMT-03:00 Romain Manni-Bucau : > Hi > > do you mix query