Kaynağa Gözat

Revert "AMBARI-17260. Remove CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity (ajit)"
Reverted due to UT failure.
This reverts commit 52031632c034ab714aed71560e430a39ddf7f210.

Yusaku Sako 9 yıl önce
ebeveyn
işleme
68b9cdad6b

+ 1 - 1
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;