[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)
6 years
[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)
6 years
[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)
6 years
[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)
6 years
[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)
6 years
[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)
6 years
[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)
6 years