bug[ats_NJ06M]: Relation order getting deleted from goals
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
index 840ed5a..24f6eb5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
@@ -142,12 +142,15 @@
       try {
          Artifact aArtifact = ArtifactQuery.getArtifactFromId(aArtifactId, branch);
 
-         if (aArtifact.getAttributeCount(CoreAttributeTypes.RelationOrder) == 1 && aArtifact.getChildren().isEmpty()) {
-            aArtifact.getSoleAttribute(CoreAttributeTypes.RelationOrder).delete();
-            if (transaction == null) {
-               aArtifact.persist("Delete empty relation order attribute for artifact: " + aArtifact.getGuid());
-            } else {
-               aArtifact.persist(transaction);
+         if (aArtifact.getAttributeCount(CoreAttributeTypes.RelationOrder) == 1) {
+            RelationOrderData relationOrderData = new RelationOrderFactory().createRelationOrderData(aArtifact);
+            if (!relationOrderData.hasEntries()) {
+               aArtifact.getSoleAttribute(CoreAttributeTypes.RelationOrder).delete();
+               if (transaction == null) {
+                  aArtifact.persist("Delete empty relation order attribute for artifact: " + aArtifact.getGuid());
+               } else {
+                  aArtifact.persist(transaction);
+               }
             }
          }