[JBoss JIRA] (WFLY-13310) Add JVM options for exec
by Hisanobu Okuda (Jira)
Hisanobu Okuda created WFLY-13310:
-------------------------------------
Summary: Add JVM options for exec
Key: WFLY-13310
URL: https://issues.redhat.com/browse/WFLY-13310
Project: WildFly
Issue Type: Enhancement
Components: Quickstarts
Affects Versions: 19.0.0.Final
Reporter: Hisanobu Okuda
Assignee: Eduardo Martins
It is useful to have a capability to specify JVM options as you like when running `mvn exec:exec` like:
{code}
mvn exec:exec -Djvm.options="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y"
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (DROOLS-5190) ClassCastException while Evaluating rules
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5190?page=com.atlassian.jira.plug... ]
Mario Fusco commented on DROOLS-5190:
-------------------------------------
Ok, so please manipulate the unit test that I pasted and try to reproduce the problem in some way. If you don't do this I don't how to proceed in the investigation of this issue.
> ClassCastException while Evaluating rules
> -----------------------------------------
>
> Key: DROOLS-5190
> URL: https://issues.redhat.com/browse/DROOLS-5190
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.18.0.Final
> Reporter: Minal Bhalodi
> Assignee: Mario Fusco
> Priority: Major
>
> We are seeing ClasscastException while evaluating kie rules. Everytime we see this issue we have to restart the server to fix it.
> This doens't happen to all our kubernetes pods where same kie-server is running. This happens to either 1 or 2 pods all the time.
> This issue is also not reproducible
> Also we see different stack Trace with ClassCastException every time, Here I am pasting some of them:
> ERROR 1 :
> [className=DroolsKieContainerCommandServiceImpl]- Error calling container 'kie_personalization'java.lang.ClassCastException: null
> ERROR 2:
> Error calling container 'kie_personalization'java.lang.ClassCastException: org.drools.core.reteoo.RuleTerminalNode cannot be cast to org.drools.core.reteoo.LeftInputAdapterNode
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:109)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:213)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
> at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
> at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
> at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1062)
> at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
> at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:109)
> at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:34)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:160)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:66)
> at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:251)
> at org.kie.server.services.drools.RulesExecutionService.call(RulesExecutionService.java:61)
> at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:70)
> at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
> at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
> at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
> at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
> at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at com.intuit.v4.intlgntsys.recommender.personalizationrulesengine.services.util.MDCFilter.doFilter(MDCFilter.java:40)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
> at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
> at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117)
> at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
> at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
> at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
> at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:748)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/HIBERNATE-172?page=com.atlassian.jira.pl... ]
nimo stephan updated HIBERNATE-172:
-----------------------------------
Description:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement for `tasks` if `tasks` is left unchanged.
was:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
> Hibernate generates no needed update statement
> ----------------------------------------------
>
> Key: HIBERNATE-172
> URL: https://issues.redhat.com/browse/HIBERNATE-172
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
>
> I have an orderinary entity with this property:
> {code:java}
> @Entity
> @DynamicUpdate
> public class User {
> private String name;
>
> @Convert(converter = TaskConverter.class)
> private Map<Task, Type> tasks;
>
> ..
> }
> {code}
> where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
>
> {code:java}
> // this update statement is always created altough "tasks" was not changed
> update User set tasks=? where id_user=?
> {code}
> The above update statement always follows after another update statement of the same entity. For example:
> {code:java}
> // here I only change the name property and an update is triggered
> update User set name=? where id_user=?
> // but then hibernate also creates immediatly this update statement even if I did not change tasks
> update User set tasks=? where id_user=?
> {code}
> It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
> Hibernate should not generate an update statement for `tasks` if `tasks` is left unchanged.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/HIBERNATE-172?page=com.atlassian.jira.pl... ]
nimo stephan updated HIBERNATE-172:
-----------------------------------
Description:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement for `tasks` if `tasks` is left unchanged. Hibernate should only generate an update statement for `tasks` if `tasks`was changed.
was:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement for `tasks` if `tasks` is left unchanged.
> Hibernate generates no needed update statement
> ----------------------------------------------
>
> Key: HIBERNATE-172
> URL: https://issues.redhat.com/browse/HIBERNATE-172
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
>
> I have an orderinary entity with this property:
> {code:java}
> @Entity
> @DynamicUpdate
> public class User {
> private String name;
>
> @Convert(converter = TaskConverter.class)
> private Map<Task, Type> tasks;
>
> ..
> }
> {code}
> where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
>
> {code:java}
> // this update statement is always created altough "tasks" was not changed
> update User set tasks=? where id_user=?
> {code}
> The above update statement always follows after another update statement of the same entity. For example:
> {code:java}
> // here I only change the name property and an update is triggered
> update User set name=? where id_user=?
> // but then hibernate also creates immediatly this update statement even if I did not change tasks
> update User set tasks=? where id_user=?
> {code}
> It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
> Hibernate should not generate an update statement for `tasks` if `tasks` is left unchanged. Hibernate should only generate an update statement for `tasks` if `tasks`was changed.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/HIBERNATE-172?page=com.atlassian.jira.pl... ]
nimo stephan updated HIBERNATE-172:
-----------------------------------
Description:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
was:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
> Hibernate generates no needed update statement
> ----------------------------------------------
>
> Key: HIBERNATE-172
> URL: https://issues.redhat.com/browse/HIBERNATE-172
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
>
> I have an orderinary entity with this property:
> {code:java}
> @Entity
> @DynamicUpdate
> public class User {
> private String name;
>
> @Convert(converter = TaskConverter.class)
> private Map<Task, Type> tasks;
>
> ..
> }
> {code}
> where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
>
> {code:java}
> // this update statement is always created altough "tasks" was not changed
> update User set tasks=? where id_user=?
> {code}
> The above update statement always follows after another update statement of the same entity. For example:
> {code:java}
> // here I only change the name property and an update is triggered
> update User set name=? where id_user=?
> // but then hibernate also creates immediatly this update statement even if I did not change tasks
> update User set tasks=? where id_user=?
> {code}
> It behaves as if `tasks` would be an @ElementCollection where the `tasks` is always recreated on create or update of any other property within `User`. However, I annotated it with `@Convert`.
> Hibernate should not generate an update statement if `tasks` is left unchanged.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/HIBERNATE-172?page=com.atlassian.jira.pl... ]
nimo stephan updated HIBERNATE-172:
-----------------------------------
Description:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates immediatly this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
was:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
> Hibernate generates no needed update statement
> ----------------------------------------------
>
> Key: HIBERNATE-172
> URL: https://issues.redhat.com/browse/HIBERNATE-172
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
>
> I have an orderinary entity with this property:
> {code:java}
> @Entity
> @DynamicUpdate
> public class User {
> private String name;
>
> @Convert(converter = TaskConverter.class)
> private Map<Task, Type> tasks;
>
> ..
> }
> {code}
> where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
>
> {code:java}
> // this update statement is always created altough "tasks" was not changed
> update User set tasks=? where id_user=?
> {code}
> The above update statement always follows after another update statement of the same entity. For example:
> {code:java}
> // here I only change the name property and an update is triggered
> update User set name=? where id_user=?
> // but then hibernate also creates immediatly this update statement even if I did not change tasks
> update User set tasks=? where id_user=?
> {code}
> It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
> Hibernate should not generate an update statement if `tasks` is left unchanged.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/HIBERNATE-172?page=com.atlassian.jira.pl... ]
nimo stephan updated HIBERNATE-172:
-----------------------------------
Description:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
private String name;
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
was:
I have an orderinary entity with this property:
{code:java}
@Entity
@DynamicUpdate
public class User {
@Convert(converter = TaskConverter.class)
private Map<Task, Type> tasks;
..
}
{code}
where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
{code:java}
// this update statement is always created altough "tasks" was not changed
update User set tasks=? where id_user=?
{code}
The above update statement always follows after another update statement of the same entity. For example:
{code:java}
// here I only change the name property and an update is triggered
update User set name=? where id_user=?
// but then hibernate also creates this update statement even if I did not change tasks
update User set tasks=? where id_user=?
{code}
It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
Hibernate should not generate an update statement if `tasks` is left unchanged.
> Hibernate generates no needed update statement
> ----------------------------------------------
>
> Key: HIBERNATE-172
> URL: https://issues.redhat.com/browse/HIBERNATE-172
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: nimo stephan
> Assignee: Steve Ebersole
> Priority: Major
>
> I have an orderinary entity with this property:
> {code:java}
> @Entity
> @DynamicUpdate
> public class User {
> private String name;
>
> @Convert(converter = TaskConverter.class)
> private Map<Task, Type> tasks;
>
> ..
> }
> {code}
> where the `Task` is an Enum-class and the `Type` is another Enum-class. The converter converts the tasks to a string and back. All works, however, Hibernate generates an additional update statement for the `tasks` when I create a new `User`-Instance or update other entity properties of the `User`-instance:
>
> {code:java}
> // this update statement is always created altough "tasks" was not changed
> update User set tasks=? where id_user=?
> {code}
> The above update statement always follows after another update statement of the same entity. For example:
> {code:java}
> // here I only change the name property and an update is triggered
> update User set name=? where id_user=?
> // but then hibernate also creates this update statement even if I did not change tasks
> update User set tasks=? where id_user=?
> {code}
> It behaves as if `tasks` would be an @ElementCollection where the tasks is always recreated on create or update of its parent entity `User`. However, I annotated it with `@Convert`.
> Hibernate should not generate an update statement if `tasks` is left unchanged.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months