QueryInvocationContext is null.

2017-12-19 Thread Luís Alves
I have the following code: @Repository public abstract class ConfigurationRepository extends AbstractEntityRepository implements EntityRepository, EntityManagerDelegate< Configuration> { *// FIXME: why this is null?!?@Injectprivate QueryInvocationContext context;* @Injec

deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
Will deltaspike work with javax.transaction.Transactional? Do I need to specify an interceptor? Where can I find an example?

Re: deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
need to just point to the container managed > transaction approach. What container are you deploying to (including > version)? > > On Tue, Feb 6, 2018 at 12:37 PM Luís Alves wrote: > > > Will deltaspike work with javax.transaction.Transactional? > > Do I need to specify an interceptor? > > Where can I find an example? > > >

Re: deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
t; > If you use wildfly10 it came with jeee7 that already came with > > annotation@Transactional. > > > > So if you use wildfy 10 you dont have to use deltaspike. > > Mauro > > > > Il 6 feb 2018 19:31, "Luís Alves" ha scritto: > > > >&g

Re: deltaspike with javax.transaction.Transactional

2018-02-07 Thread Luís Alves
se cases, and JMS, etc. Presently I deal with the JMS + SMTP + JPA > use case today and haven't seen it falter too much. > > I don't add @Transactional to my repositories, the transaction boundary > tends to be at a higher level (Services). > > John > > On Tue, Fe

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread Luís Alves
F/apache-deltaspike.properties, as John point out. Or I need to place this alternative on the jar(s) of my sevice layer where the TX is started. I'm going to try some scenarios this afternoon. On Wed, Feb 7, 2018 at 5:35 PM, Luís Alves wrote: > Thanks John. I going to test it

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread Luís Alves
yup :) thanks John On Thu, Feb 8, 2018 at 12:39 PM, John D. Ament wrote: > Luis, > > This issue is solved by using the global alternative in > META-INF/apache-deltaspike.properties. > > John > > On Thu, Feb 8, 2018 at 7:11 AM Luís Alves wrote: > > > So...

null QueryInvocationContext (querydsl)

2018-02-08 Thread Luís Alves
Hello, I'm trying to user QueryDSL. From the examples at https://deltaspike.apache.org/documentation/data.html O got to something like this: @Repository public abstract class ConfigurationRepository extends AbstractEntityRepository implements EntityRepository, EntityManagerDelegate {

Re: null QueryInvocationContext (querydsl)

2018-02-08 Thread Luís Alves
well...I can acess the current EM with: final JPAQuery qry = new JPAQuery( *entityManager()*).from(c) .where(c.key.eq(key)); so I don't need to inject the context. I don't need a fancy delegate. On Thu, Feb 8, 2018 at 3:39 PM, Luís Alves wrote: > Hello, > >

deltaspike @Repository scope

2018-02-13 Thread Luís Alves
Hi, What is the scope of @Repository? Do you use a similar approach of Spring? @Singleton and proxy the EM? Regards, LA

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
0:24 AM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > Hi, > > the default scope is @Dependent but i suggest everyone to use > @ApplicationScoped. > The EM will be proxied if you use a NormalScope like @RequestScoped, > > Regards, > Thomas > &g

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
"An instance of a dependent bean is never shared between *different clients *or different injection points." "Beans with scope @Dependent don’t need a proxy object. The client holds a direct reference to its instance." so...I think I should be OK. On Tue, Feb 13, 2018 at

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
t; > 2018-02-13 11:39 GMT+01:00 Luís Alves : > > > "An instance of a dependent bean is never shared between *different > clients > > *or different injection points." > > "Beans with scope @Dependent don’t need a proxy object. The client holds > a > >

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
ook at [1]. > > regards, > gerhard > > [1] http://deltaspike.apache.org/documentation/jpa.html#Basicusage > > > > 2018-02-13 12:11 GMT+01:00 Luís Alves : > > > Well...I have REST services...so I think RequestScoped EM would be ok. > > > > On Tue, Feb 13,

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
> > regards, > gerhard > > > > 2018-02-13 12:31 GMT+01:00 Luís Alves : > > > There you use the @RequestScopedand you present @TransactionScoped, > > which seems exactly what I want but not sure what happens when TX is > marked > > as NEVER or SUPPORT

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
> regards, > gerhard > > [1] > https://github.com/apache/deltaspike/blob/master/ > deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/ > transaction/ContainerManagedTransactionStrategy.java > > > > 2018-02-13 12:58 GMT+01:00 Luís Al

Re: deltaspike @Repository scope

2018-02-14 Thread Luís Alves
ncy-utils. > It doesn't require the request context to get activated :( > > You can work around this with DeltaSpike CdiCtrl or the CDI-2.0 Context > activator (if you are on an EE 8 server). > > LieGrue, > strub > > > Am 13.02.2018 um 15:48 schrieb Luís Alves : >

Re: deltaspike @Repository scope

2018-02-14 Thread Luís Alves
gt; wrote: > hi luis, > > just fyi: > the ds-scheduler module [1] is using quartz as a default implementation and > provides a proper scope-handling out-of-the-box. > > regards, > gerhard > > [1] http://deltaspike.apache.org/documentation/scheduler.html > > >

@CacheResult not intercepted.

2018-02-14 Thread Luís Alves
This is not really DS specific, but DS might have some solutions. I'm using @CacheResult, but if I do a call from the same class the interceptor is not triggered so the cache doesn't work. I suffered from the same issue with Spring (describe here: https://stackoverflow.com/questions/16899604/sprin

Re: @CacheResult not intercepted.

2018-02-14 Thread Luís Alves
self; Is this safe/good idea? On Wed, Feb 14, 2018 at 2:31 PM, Luís Alves wrote: > This is not really DS specific, but DS might have some solutions. > > I'm using @CacheResult, but if I do a call from the same class the > interceptor is not triggered so the cache doesn't wor

Gradle

2018-02-22 Thread Luís Alves
For Test Control to work I've placed this: //place the resources into the classesDir as described in https://deltaspike.apache.org/documentation/test-control.html#_gradle sourceSets { main { output.resourcesDir = output.classesDir } test { output.resourcesDir = outpu

Re: Is it possible to use Junit for Deltaspike Data Module Repository testing?

2018-03-26 Thread Luís Alves
Hi Thomas, I'm using database rider (https://github.com/database-rider/database-rider) with DS CdiTestRunner. Something like this: *@RunWith(CdiTestRunner.class)@DBUnitInterceptor* public class ConfigurationRepositoryTest { * @Inject* private ConfigurationRepository configurationReposit

@Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-06 Thread Luís Alves
Hello, I'm getting: Caused by: java.lang.RuntimeException: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped On bootstrap: @ApplicationScoped public class BootConfig { @Inject private Logger logger;

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
ry as soon as my colleague arrive, since the code his on his machine. Btw, we use wildfly-10.1.0.Final, if this is a bug can you open a bug? Regards, LA On Mon, Apr 9, 2018 at 7:56 AM, Martin Kouba wrote: > Dne 6.4.2018 v 18:37 Luís Alves napsal(a): > >> Hello, >> >>

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
scope and not at @Observes @Initialized(ApplicationScoped.class)? - @Inject(ed) beans are available here LA On Mon, Apr 9, 2018 at 8:44 AM, Martin Kouba wrote: > Dne 9.4.2018 v 09:33 Luís Alves napsal(a): > >> Thanks for you answers. >> Before I left we tried with @Transa

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
hod must have the >> Request Context activated. >> > > Mark, this is very wrong! Which part of the spec dou you refer? > > > > And this very observer IS a business method. >> >> LieGrue, >> strub >> >> >> Am 09.04.2018 um 10:58 schrieb

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
gister it. > > On Mon, Apr 9, 2018 at 8:41 AM Luís Alves wrote: > > > It partially worked on @PostConstruct :), my colleague is having some > issue > > with the TX. I'm working from home today, so I can only have a clear look > > tomorrow. > > @Transactional

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-11 Thread Luís Alves
t not 100% sure. Should I have a dispose or not? Regards, LA On Mon, Apr 9, 2018 at 3:50 PM, Luís Alves wrote: > Thanks John. > DS allows to programmatically activate the scope (Container Control > Module). > Not sure if it works the same way of @ActivateRequestContext. > Nevertheless i

@Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Hi, @Repository is @Dependent scoped...and seems that @Dependent don't run interceptors, so @CacheResult(cacheName = "my-cache") annotation isn't working :( I remember that some one proposed that @Repository could/should be @ApplicationScoped...if I change them do I have to worry with anything? M

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
since it's proxied...it should be OK...I guess it's like Spring's repositories. On Fri, Apr 20, 2018 at 9:44 AM, Luís Alves wrote: > Hi, > > @Repository is @Dependent scoped...and seems that @Dependent don't run > interceptors, so @CacheResult(cacheName = "

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
even with @ApplicationScoped the interceptor is not working :( can't figure out why...can't @Repository methods be intercepted? On Fri, Apr 20, 2018 at 9:53 AM, Luís Alves wrote: > since it's proxied...it should be OK...I guess it's like Spring's > repositories

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
So far I found that @Repository is actually a @PartialBeanBinding and I found: "Currently CDI Interceptors applied via @Interceptors, @Intercepted and @Decorator are not supported by our proxies! "...does it means that I'm screwed ;)? LA On Fri, Apr 20, 2018 at 10:11 AM, Lu

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
gt; > 2018-04-20 11:22 GMT+02:00 Thomas Andraschko >: > > > Interceptors in generell should be supported but only via custom binding > - > > not via "@Interceptors, @Intercepted and @Decorator" > > > > 2018-04-20 11:21 GMT+02:00 Luís Alves : > &

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
LA On Fri, Apr 20, 2018 at 10:45 AM, Luís Alves wrote: > Thanks Thomas, > > if I understood correctly if they are on the bean.xml they should works > :)...only annotated one don't work. > > I'm now (not sure why I didn't had it before) getting: > org.

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
So far no success...@CacheResult on @ApplicationScoped @Repository public abstract class SomeRepository doesn't seem to work :S not sure what I'm doing wrong. On Fri, Apr 20, 2018 at 11:03 AM, Luís Alves wrote: > I ditched the CustomBaseRepository for now...but still can&#x

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
provide a unittest for the data > module. > I don't have time to prepare it by myself. > > > 2018-04-20 12:40 GMT+02:00 Luís Alves : > > > So far no success...@CacheResult on > > > > @ApplicationScoped > > @Repository > > public abstract c

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
moved the @CustomInterceptor declaration of the interceptor for the web app beans.xml and now it gets calledSO it should work for the cache as well. Any hint? On Fri, Apr 20, 2018 at 12:43 PM, Luís Alves wrote: > So I've created a custom one (in fact is a "copy" of yours

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
don't you want to rewrite your tests with the @CacheResult interceptor ;) ? to see if it works? On Fri, Apr 20, 2018 at 12:57 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > No idea, debug if the interceptor is really called ;) > > 2018-04-20 13:56

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
@Retention(RUNTIME) @Target({ TYPE, METHOD }) // @InterceptorBinding public @interface CustomInterceptor { } I suspect is this @InterceptorBindingbut not 100% surewhat is the purpose of that? On Fri, Apr 20, 2018 at 1:06 PM, Luís Alves wrote: > don't you want to rewrite your te

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
can you update your test to remove @InterceptorBinding? and check if it works? javax.cache.annotation.CacheResult is standard so I don't want to extend it to have the @InterceptorBinding.if this is really the problem. On Fri, Apr 20, 2018 at 1:11 PM, Luís Alves wrote: > @Retention

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
nding). > Everything else, like stated in the doc (@Interceptors, @Intercepted, > @Decorator), is not supported. > > 2018-04-20 14:31 GMT+02:00 Thomas Andraschko >: > > > In must not work without the interceptorbinding. Do you mean that it does > > work without? > &g

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
solution for now is to create a own binding. > > 2018-04-20 14:55 GMT+02:00 Luís Alves : > > > uhm...that's not good :S > > > > the annotation is this one: > > > > https://static.javadoc.io/javax.cache/cache-api/1.0.0/ > > javax/cache/annotation/Cach

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Apr 20, 2018 at 2:33 PM, Luís Alves wrote: > I suppose it's CDI capable. > > https://www.jcp.org/en/jsr/detail?id=107 > > > > On Fri, Apr 20, 2018 at 2:24 PM, Thomas Andraschko < > andraschko.tho...@gmail.com> wrote: > >> Puh, i wonder why they did it wi

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Submitted: https://github.com/jsr107/jsr107spec/issues/401 I suppose they will tell the issue is from DS...:( On Fri, Apr 20, 2018 at 2:36 PM, Luís Alves wrote: > I suppose it's CDI capable. > > https://www.jcp.org/en/jsr/detail?id=107 > > Red Hat > : Pete Muir <-

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
of using interceptors with CDI: > > 1) @InterceptorBinding > 2) @Interceptors(..) > > We only support 1) currently. > > So i have currently no idea how @CacheResult will work even a normal CDI > bean. Maybe it's done in Wildfly but not via the "normal" CDI w

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
annot "see" the annotation? On Fri, Apr 20, 2018 at 3:25 PM, Luís Alves wrote: > This is the reference implementation of the interceptors: > https://github.com/jsr107/RI > They have: > > http://java.sun.com/xml/ns/javaee"; >xmlns:xsi=&quo

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
master/ > deltaspike/modules/proxy/api/src/main/java/org/apache/ > deltaspike/proxy/spi/invocation/DeltaSpikeProxyInterceptorLookup.java#L90 > > This code would need ask CDI if this annotation is a interceptor binding > (if possible, not sure if it's in the CDI API). Then yo

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
/ > inject/spi/BeanManager.html#isInterceptorBinding-java.lang.Class- > > Would be great if you can test it, create a issue and provide a patch. > > Am Freitag, 20. April 2018 schrieb Luís Alves : > > > I have no idea if it's possible or not. Isn't any CDI expert on the > m

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
where the hell is DeltaSpikeProxyInterceptorLookup? which jar I have to import?! On Fri, Apr 20, 2018 at 4:25 PM, Luís Alves wrote: > I'll try@Specializes on CustomDeltaSpikeProxyInterceptorLookup > extends DeltaSpikeProxyInterceptorLookup should do the trick. > > On Fri,

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
found this one: org.apache.deltaspike.proxy.impl.invocation.InterceptorLookup on version 1.8.0 On Fri, Apr 20, 2018 at 4:43 PM, Luís Alves wrote: > where the hell is DeltaSpikeProxyInterceptorLookup? which jar I have to > import?! > > > On Fri, Apr 20, 2018 at 4:25 PM, Lu

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
On Fri, Apr 20, 2018 at 4:48 PM, Luís Alves wrote: > found this one: org.apache.deltaspike.proxy.impl.invocation.InterceptorLookup > on version 1.8.0 > > On Fri, Apr 20, 2018 at 4:43 PM, Luís Alves wrote: > >> where the hell is DeltaSpikeProxyInterceptorLookup? whi

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
203 instead of my method :( any ideas? On Fri, Apr 20, 2018 at 5:07 PM, Luís Alves wrote: > seems to work: org.apache.deltaspike.proxy.impl.invocation. > ManualInvocationContext@59fae308 > > not sure the cache is actually working but I think it's not related with > DS. If pos

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
I have to leave :( don't do any change until I can confirm everything ;( have a nice weekend. On Fri, Apr 20, 2018 at 5:12 PM, Luís Alves wrote: > wellI think we might have an issue with the proceed part: > > try { > //Call the annotated method > r

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-23 Thread Luís Alves
i, Apr 20, 2018 at 8:11 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > Would be great if you could create a issue + unittest, so i can fix it next > week. > > Am Freitag, 20. April 2018 schrieb Luís Alves : > > > I have to leave :( don't do any chang

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-23 Thread Luís Alves
ehaviour with and without the @CustomInterceptor. On Mon, Apr 23, 2018 at 9:12 AM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > do you mean that method.getDeclaredAnnotations does not return CacheResult? > > 2018-04-23 10:09 GMT+02:00 Luís Alves : > > > Good mor

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-23 Thread Luís Alves
idea? On Mon, Apr 23, 2018 at 9:17 AM, Luís Alves wrote: > so far I think the *method*.getDeclaredAnnotations() when I don't have > the @CustomInterceptor is the findBy instead of the findLocationById...but > I can't understand why :( > that's why no annotation it's

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-24 Thread Luís Alves
8 at 1:36 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > Should be fixed now by DELTASPIKE-1339. > > 2018-04-23 11:31 GMT+02:00 Luís Alves : > > > when: > > > > //Call the ann

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-04-28 Thread Luís Alves
Hi Colin, Thanks for clarifying that. As I'm on vacation I did even tried to use 1.8.1, but AFAIK it shouldn't work. LA On Fri, Apr 27, 2018 at 9:20 PM, Astley, Colin (C.J.) wrote: > Hello, > > I'm writing to let you know that I tested 1.8.x with our applications and > it works. I replied on t

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
> > I want to make sure we're talking about the same thing. I tested some > fixes Thomas made and added to 1.8.x that make DeltaSpike Data work on WAS > 8 again. It had stopped working in 1.8.1. > > Colin > > -----Original Message- > From: Luís Alves > Sen

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
> Would be great if you could test it ;) > > > 2018-05-02 9:49 GMT+02:00 Luís Alves : > > > Hi Colin, > > > > what you've asked has nothing to do with issue I had. > > I was tying to use JCache (JSR-107) annotation in a @Repository and they > > aren&#x

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
Tested. It works as in the master. Thanks :) LA On Wed, May 2, 2018 at 9:59 AM, Luís Alves wrote: > Ok...I just have to finish something that I have on my working > copy...let's hope it doesn't take 6 hours to build like last time ;) > > LA > > On Wed, May 2, 2018 a

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
y 2, 2018 at 11:12 AM, Luís Alves wrote: > Tested. It works as in the master. Thanks :) > > LA > > On Wed, May 2, 2018 at 9:59 AM, Luís Alves wrote: > >> Ok...I just have to finish something that I have on my working >> copy...let's hope it doesn't take 6

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
it's seems to be extensible: https://deltaspike.apache.org/documentation/proxy.html#_2_extend_code_deltaspikeproxyfactory_code so I'll dig in to try to make a custom implementation. On Wed, May 2, 2018 at 11:39 AM, Luís Alves wrote: > Trying to get your changes in my code, so I do

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
I think I'm out of luck...you've restricted it to package: @ApplicationScoped class DeltaSpikeProxyInterceptorLookup so I can't specialize it...:( On Wed, May 2, 2018 at 11:49 AM, Luís Alves wrote: > it's seems to be extensible: https://deltaspike.apache.org/ >

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
runk, too ;) > > 2018-05-02 13:17 GMT+02:00 Luís Alves : > > > I think I'm out of luck...you've restricted it to package: > > > > @ApplicationScoped > > class DeltaSpikeProxyInterceptorLookup > > > > so I can't specialize it...:( > > > &

Re: Issue using deltaspike repository in ManagedExecutorService

2018-08-27 Thread Luís Alves
Hi, I had a similar issue but was on @Observes @Initialized(ApplicationScoped.class). The trick was to move my logic to a @PostConstruct. btw my Entity Manager Producer looks like: @ApplicationScoped public class EntityManagerProducerImpl implements EntityManagerProducer { @PersistenceConte

Re: TransactionRequiredException when a transaction should exist

2020-05-08 Thread Luís Alves
Lucian, I think you are trying to persist a detached entity. Try this: @Transactional public void update(StuffDto stuffDto) throws Exception { Stuff entity = repository.findById(stuffDto.getId()); entity.setName(stuffDto.getName()); //To do mapping use something like mapstruct rep