[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 {
@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}
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 {
>
> @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
[JBoss JIRA] (HIBERNATE-172) Hibernate generates no needed update statement
by nimo stephan (Jira)
nimo stephan created HIBERNATE-172:
--------------------------------------
Summary: 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
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}
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] (WFCORE-4896) Support iteration over filtered cli query
by Georg Tsakumagos (Jira)
Georg Tsakumagos created WFCORE-4896:
----------------------------------------
Summary: Support iteration over filtered cli query
Key: WFCORE-4896
URL: https://issues.redhat.com/browse/WFCORE-4896
Project: WildFly Core
Issue Type: Enhancement
Components: CLI, Management
Reporter: Georg Tsakumagos
Assignee: Jean Francois Denise
It would be usefull to iterate over filtered queries in cli. I need to spare the only alowed level of if expression for the control foll inside the loop. I like to update all profiles containing elytron subsystem and to spare out all inherited profiles which include the base profiles.
{code:java|title=CLI query example}
for profile in /profile=*:query(select=[name], where=[includes=undefined])
echo $profile
done
{code}
{code:JSON|title=actual result}
{"address" => [("profile" => "default")],"outcome" => "success","result" => {"name" => "default"}}
{"address" => [("profile" => "ha")],"outcome" => "success","result" => {"name" => "ha"}}
{"address" => [("profile" => "full")],"outcome" => "success","result" => {"name" => "full"}}
{"address" => [("profile" => "full-ha")],"outcome" => "success","result" => {"name" => "full-ha"}}
{"address" => [("profile" => "load-balancer")],"outcome" => "success","result" => {"name" => "load-balancer"}}
{code}
{code:java|title=desired result}
default
full
full-ha
gfi
ha
load-balancer
{code}
Maybe it would be a solution to extend the operation extend read-children-names by an property where to apply a filter.
{code:JSON|title=extend read-children-names}
for profile in /:read-children-names(child-type=profile,where=[includes=undefined])
echo $profile
done
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (WFLY-13308) BOMs is a separate component
by Eduardo Martins (Jira)
Eduardo Martins created WFLY-13308:
--------------------------------------
Summary: BOMs is a separate component
Key: WFLY-13308
URL: https://issues.redhat.com/browse/WFLY-13308
Project: WildFly
Issue Type: Bug
Components: Build System
Environment: Patched Galleon to obey dependency management (issue forthcoming)
Reporter: Eduardo Martins
Assignee: Eduardo Martins
Fix For: 19.0.0.Beta1, 19.0.0.Final
{{wildfly-jms-client-bom}} is defined as having version {{${project.version}}}, but the main codebase does not produce this artifact.
https://github.com/jbossas/jboss-eap7/blob/CD14/pom.xml#L819
It is produced at https://github.com/wildfly/boms/blob/master/client/jms-client/pom.xml#L40
If Galleon were to obey dependency management this leads to:
{noformat}
[ERROR] Failed to execute goal org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin:2.0.1.Alpha1-SNAPSHOT:generate-feature-specs (feature-spec-build) on project wildfly-galleon-pack: Failed to resolve artifact org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT as a dependency of eap-cd-servlet@maven(org.jboss.universe:product-universe):current#7.2.0.CD14-redhat-SNAPSHOT (persisted as org.jboss.eap:wildfly-jms-client-bom:7.2.0.CD14-redhat-SNAPSHOT::pom): Couldn't resolve artifact: Failure to find org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin:2.0.1.Alpha1-SNAPSHOT:generate-feature-specs (feature-spec-build) on project wildfly-galleon-pack: Failed to resolve artifact org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT as a dependency of eap-cd-servlet@maven(org.jboss.universe:product-universe):current#7.2.0.CD14-redhat-SNAPSHOT (persisted as org.jboss.eap:wildfly-jms-client-bom:7.2.0.CD14-redhat-SNAPSHOT::pom)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to resolve artifact org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT as a dependency of eap-cd-servlet@maven(org.jboss.universe:product-universe):current#7.2.0.CD14-redhat-SNAPSHOT (persisted as org.jboss.eap:wildfly-jms-client-bom:7.2.0.CD14-redhat-SNAPSHOT::pom)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.processFeaturePackDep(WfFeatureSpecBuildMojo.java:564)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.processFeaturePackDeps(WfFeatureSpecBuildMojo.java:511)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.doExecute(WfFeatureSpecBuildMojo.java:235)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.execute(WfFeatureSpecBuildMojo.java:191)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 27 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Couldn't resolve artifact: Failure to find org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.findArtifact(WfFeatureSpecBuildMojo.java:716)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.processFeaturePackDep(WfFeatureSpecBuildMojo.java:562)
... 32 more
Caused by: org.apache.maven.shared.artifact.resolve.ArtifactResolverException: Failure to find org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:116)
at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:80)
at org.apache.maven.shared.artifact.resolve.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:73)
at org.wildfly.galleon.maven.WfFeatureSpecBuildMojo.findArtifact(WfFeatureSpecBuildMojo.java:713)
... 33 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact(Maven31ArtifactResolver.java:108)
... 36 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.jboss.eap:wildfly-jms-client-bom:pom:7.2.0.CD14-redhat-SNAPSHOT in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:183)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 40 more
{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months