Repository: ambari Updated Branches: refs/heads/trunk 89870f28a -> 47b8173ae
Revert "RemoAMBARI-17260. Remove CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity (ajit)" Reverting due to UT failure. This reverts commit ccffce1ca6f9dd26b044c649fa356a2d660554ec. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/47b8173a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/47b8173a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/47b8173a Branch: refs/heads/trunk Commit: 47b8173aeb913ebaa2459f1b28187b7ba7e88576 Parents: 89870f2 Author: Yusaku Sako <[email protected]> Authored: Thu Jun 16 15:38:16 2016 -0700 Committer: Yusaku Sako <[email protected]> Committed: Thu Jun 16 15:38:16 2016 -0700 ---------------------------------------------------------------------- .../ambari/server/orm/entities/ServiceComponentHistoryEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/47b8173a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java index 0783d98..e7fef71 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java @@ -57,7 +57,7 @@ public class ServiceComponentHistoryEntity { @Column(name = "id", nullable = false, updatable = false) private long m_id; - @ManyToOne(optional = false) + @ManyToOne(optional = false, cascade = { CascadeType.MERGE }) @JoinColumn(name = "component_id", referencedColumnName = "id", nullable = false) private ServiceComponentDesiredStateEntity m_serviceComponentDesiredStateEntity;
