Pergunta

i am relatively new to Spring Web Flow and Spring Data JPA. I searched all over the web with no luck and sincerely hope that I can find help.

I'm trying to save an object within a flow taking advantage of the PersistenceContext tag. When i omit the tag, everything runs fine, but that is not the idea since i dont want the transaction commit until the end of the flow.

And when i save with PersistenceContext, i got a fail update coming out of no where, as shown in the console,

Hibernate: insert into Tb_Horario (DescripcionRestringido, Fase, FechaFin, FechaInicio, FlagReservado, FlagRestringido, HorasTotal, Operador) values (?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: update Tb_Horario set Fase=?, Id=? where id=?

and because Id got Identity auto generated values, i get an java.sql.SQLException in my error trace. As i say, when i omit the persistente context, i only get the insert but no the dammed update.

I appreciate any help in advance.

Here is my flow:

<persistence-context /> 

<input name="solicitudId" required="true" />

<on-start>
    <evaluate expression="solicitudService.armarSolicitudDTO(solicitudId)" result="flowScope.solicitudDTO" />
</on-start>

<view-state id="programarSolicitud" model="solicitudDTO">   
    <on-render>
        <render fragments="body" />
    </on-render>            
    <transition on="programarFase" to="programarOperador" >
        <set name="viewScope.operadorId" value="currentEvent.attributes.operadorId"/>
        <set name="viewScope.ordenFase" value="currentEvent.attributes.ordenFase"/>                 
        <evaluate expression="operadorService.findById(operadorId)" result="flowScope.operador" />
        <evaluate expression="solicitudDTO.getFases().get(ordenFase)" result="flowScope.fase" />                    
    </transition>
<transition on="programarSolicitud" to="programacionRegistrada"/>       
</view-state>

<view-state id="programarOperador" model="horarioDTO">
    <var name="horarioDTO" class="org.mbcorp.sar.model.Horario"/>
    <on-render>
        <render fragments="body" />
    </on-render>
    <transition on="programarHorario" to="programarSolicitud">
        <evaluate expression="horarioService.save(horarioDTO)" />
    </transition>
</view-state>

<end-state id="programacionRegistrada" commit="true"/>

My web flow config file:

<webflow:flow-executor id="flowExecutor">
    <webflow:flow-execution-listeners>
        <webflow:listener ref="securityFlowExecutionListener" />
        <webflow:listener ref="jpaFlowExecutionListener" />
    </webflow:flow-execution-listeners>
</webflow:flow-executor>

<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF">
    <webflow:flow-location-pattern value="/**/*-flow.xml" />
</webflow:flow-registry>

<webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator" 
    development="true" validator="validator" />

<bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"> 
    <property name="viewResolvers" ref="tilesViewResolver"/>
    <property name="useSpringBeanBinding" value="true" />
</bean>

<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />

<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>

<bean id="jpaFlowExecutionListener" 
      class="org.springframework.webflow.persistence.JpaFlowExecutionListener">
    <constructor-arg ref="entityManagerFactory" />
    <constructor-arg ref="transactionManager" />
</bean>

And the persistence beans:

<jpa:repositories base-package="org.mbcorp.sar.dao" />

<bean class="org.springframework.orm.jpa.JpaTransactionManager" id="transactionManager">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
    <property name="jpaDialect">
        <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
    </property>
</bean>

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="packagesToScan" value="org.mbcorp.sar.model" />
    <property name="jpaVendorAdapter">
        <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
            <property name="generateDdl" value="true" />
            <property name="showSql" value="true" />
            <property name="database" value="SQL_SERVER" />
            <property name="databasePlatform" value="org.hibernate.dialect.SQLServerDialect" />

        </bean>
    </property>
</bean>

EDIT: The error trace is the following:

oct 22, 2013 9:52:24 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: El Servlet.service() para el servlet [Spring MVC Dispatcher Servlet] en el contexto con ruta [/sar] lanzó la excepción [Request processing failed; nested exception is org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@b2a6737 targetAction = [EvaluateAction@2708a9c6 expression = horarioService.save(horarioDTO), resultExpression = [null]], attributes = map[[empty]]] in state 'programarOperador' of flow 'views/programacion' -- action execution attributes were 'map[[empty]]'] con causa raíz
java.sql.SQLException: No se puede actualizar la columna de identidad 'Id'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:506)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1474)
at org.hibernate.persister.collection.OneToManyPersister.insertRows(OneToManyPersister.java:190)
at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:86)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:278)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1233)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:403)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:75)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:513)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy60.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69)
at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:286)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82)
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:98)
at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:84)
at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:75)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.engine.support.ActionTransitionCriteria.test(ActionTransitionCriteria.java:82)
at org.springframework.webflow.engine.support.TransitionCriteriaChain.test(TransitionCriteriaChain.java:68)
at org.springframework.webflow.engine.Transition.canExecute(Transition.java:196)
at org.springframework.webflow.engine.Transition.execute(Transition.java:212)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:231)
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:195)
at org.springframework.webflow.engine.Flow.resume(Flow.java:537)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:227)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

EDIT2: Here the Horario class

@Entity
@Table(name = "Tb_Horario")
public class Horario implements Serializable{

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;

@Column(name = "HorasTotal", nullable = false)
private Integer horasTotal;

@DateTimeFormat(pattern = "dd-MM-yyyy")
@Column(name = "FechaInicio", nullable = false)
private Date fechaInicio;

@Column(name = "FechaFin", nullable = false)
private Date fechaFin;

@Column(name = "FlagRestringido", nullable = false)
private boolean flagRestringido;

@Column(name = "DescripcionRestringido", nullable = true)
private String descripcionRestringido;

@Column(name = "FlagReservado", nullable = false)
private boolean flagReservado;

@JoinColumn(name = "Operador")
@ManyToOne(optional = false, fetch = FetchType.EAGER)
private Operador operador;

@JoinColumn(name = "Fase")
@ManyToOne(optional = false, fetch = FetchType.EAGER)
private Fase fase;

@Transient
private int horaInicio;

...
//setters and getters
}

And Fase class:

@Entity
@Table(name = "Tb_Fase")
public class Fase implements Serializable{

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;

@Column(name = "Nombre", nullable = false)
private String nombre;

@Column(name = "Descripcion", nullable = false)
private String descripcion;

@Column(name = "FechaRegistro", nullable = false)
private Date fechaRegistro;

@Column(name = "FechaInicio", nullable = true)
private Date fechaInicio;

@Column(name = "FechaFin", nullable = true)
private Date fechaFin;

@Column(name = "Comentarios", nullable = true)
private String comentarios;

@Column(name = "EsfuerzoEstimado", nullable = true)
private Integer esfuerzoEstimado;

@Column(name = "CostoEstimado", nullable = true)
private Integer costoEstimado;

@Column(name = "EsfuerzoReal", nullable = true)
private Integer esfuerzoReal;

@Column(name = "CostoReal", nullable = true)
private Integer costoReal;

@JoinColumn(name = "Solicitud", insertable = false, updatable=false, nullable = false)
@ManyToOne(optional = false, fetch = FetchType.EAGER)
private Solicitud Solicitud;

@OneToMany(fetch = FetchType.EAGER)
@JoinColumn(name = "Fase", nullable = true)
@IndexColumn(name= "Id")
private List<Horario> horarios;

@ManyToMany
@LazyCollection(LazyCollectionOption.FALSE)
@JoinTable(name="tb_CompetenciaFase", joinColumns = {@JoinColumn(name="IdFase")},
           inverseJoinColumns={@JoinColumn(name="IdCompetencia")})
private List<Competencia> competencias;

@Column(name = "RecursosEstimados", nullable = true)
private Integer recursosEstimados;

@Column(name = "OrdenFase", nullable = true)
private Integer ordenFase;

@Transient
private List<Operador> recursosDisponibles;

@Transient
private int recursosUtilizados;

@Transient
private int horasProgramadas;

...
/getters and setters
}

The method horarioService.save(horarioDTO) is just calling a @Service class which is calling the save method from a JpaRepository. I tested it and is doing its work, calling only an INSERT query. But i have absolutely no idea what is generating the UPDATE (or if its intended, why is working weird), appearing when the <persistence-context/> is present in the flow.

EDIT3: I changed the Horario mapping to:

@OneToMany(fetch = FetchType.EAGER)
@JoinColumn(name = "Fase", nullable = true)
@IndexColumn(name= "HorasTotal")
private List<Horario> horarios;

and suppressed (against my will) the null restriction from the columns Fase and HorasTotal. Its now working partially with some odd or intended behaviors. Let me elaborate:

1st issue:

I still get an update after the insert:

Hibernate: insert into Tb_Horario (DescripcionRestringido, Fase, FechaFin, FechaInicio, FlagReservado, FlagRestringido, HorasTotal, Operador) values (?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: update Tb_Horario set Fase=?, HorasTotal=? where id=?

I dont get any issues from Fase, but the value of HorasTotal is being overwritten according to a sequential order, so I'm thinking of creating a special column to index the table.

2nd issue:

The Horario information is being saved in the database regardless the flow end, where COMMIT happens. I applied this solution to put the flushMode to COMMIT, but the data COMMIT or not.

PS: I updated the flow with the missing end state.

Foi útil?

Solução 2

1st issue SOLVED.

Thanks to ben75 I realized that my mapping could be wrong so i changed the mapping of Horario from:

@OneToMany(fetch = FetchType.EAGER)
@JoinColumn(name = "Fase", nullable = true)
@IndexColumn(name= "Id")
private List<Horario> horarios;

to

@OneToMany(mappedBy = "fase")
@LazyCollection(LazyCollectionOption.FALSE)
private List<Horario> horarios;

seems that @IndexColumn was causing the problema so i removed it. Regarding the second issue, I think it might be due the hibernate flushmode or the FlowExecutionListener supporting Spring data-jpa, because i am using JpaFlowExecutionListener instead HibernateFlowExecutionListener (i cant use it because i dont have a SessionFactory).

Outras dicas

You can try this in your hibernate configuration

<property name="org.hibernate.FlushMode" value="commit" />

By default, Hibernate runs in FlushMode AUTO. It means that hibernate will decide on it's own when the persistence context must be flushed. Typically, when you use id generated, Hibernate will usually decide to flush when a new object is inserted in the persistence context (so that it get an Id immediately).

Changing it to COMMIT will force hibernate to wait until the end of the transaction.

Few other remarks :

  • I don't see the commit point in your flow. According the doc, you must add something like this in your flow:

<end-state id="endStateId" commit="true" />

  • Posting the error trace can really help...

EDIT

There is something strange in your mapping. You are using the Id column as index for your collection. I guess this is the root cause of your problem, because you are using a purely technical column (the pk) for a business data (i.e. ordering a collection).

Looking at the case of this log :

update Tb_Horario set Fase=?, Id=? where id=?

You can see that the column updated have a capitalized I, that's why I'm pretty sure that hibernate try to update the @IndexColumn... and it fail because it is also the primary key.

So, I suggest you to add a new column for indexing your collection.


EDIT 2

Regarding second issue:

  • Double check that horario is in your database before the end of the flow (with a third-party DB client)
  • Check how do you get the EntityManager in horarioService. (You are supposed to obtain it with a @EntityManager annotation without property extended !!!)

If after those checks the problem is confirmed, you can try this workaround:

use :

<evaluate expression="persistenceContext.persist(horarioDTO)"/>

instead of :

<evaluate expression="horarioService.save(horarioDTO)" />

Of course, this workaround is acceptable only if horarioService.save() don't perform any extra business logic (i.e. nothing more than calling persist()).

According the DTO suffix, I guess you may need to transform the DTO into an entity prior to persist. Hopefully, you will be able to do that with another expression : something like

<evaluate expression="horarioService.save(horarioDTO.toEntity())" />
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top