Skip to content

Commit

Permalink
change root to parent for parent child relation (#601)
Browse files Browse the repository at this point in the history
Co-authored-by: Yingjian Wu <yingjianw@netflix.com>
  • Loading branch information
stevie9868 and Yingjian Wu authored Jul 3, 2024
1 parent e9fce8d commit 6ea9332
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public final class ParentChildRelMetadataConstants {
* During create, nested level key specified in DefinitionMetadata['parentChildRelationInfo']
* that indicate the parent table name.
*/
public static final String PARENT_NAME = "root_table_name";
public static final String PARENT_NAME = "parent_table_name";
/**
* During create, nested level key specified in DefinitionMetadata['parentChildRelationInfo']
* that indicates the parent table uuid.
*/
public static final String PARENT_UUID = "root_table_uuid";
public static final String PARENT_UUID = "parent_table_uuid";
/**
* During create, nested level key specified in DefinitionMetadata['parentChildRelationInfo']
* that indicates the child table uuid.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private Optional<Runnable> saveParentChildRelationship(final QualifiedName child
String parentUUID;
String childUUID;
if (!parentChildRelInfo.has(ParentChildRelMetadataConstants.PARENT_UUID)) {
throw new RuntimeException("root_table_uuid is not specified for parent table="
throw new RuntimeException("parent_table_uuid is not specified for parent table="
+ parentName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ class TableServiceImplSpec extends Specification {
def mapper = new ObjectMapper()

def innerNode = mapper.createObjectNode()
innerNode.put("root_table_name", "clone/clone/p")
innerNode.put("root_table_uuid", "p_uuid")
innerNode.put(ParentChildRelMetadataConstants.PARENT_NAME, "clone/clone/p")
innerNode.put(ParentChildRelMetadataConstants.PARENT_UUID, "p_uuid")
innerNode.put("child_table_uuid", "child_uuid")

def outerNode = mapper.createObjectNode()
Expand Down

0 comments on commit 6ea9332

Please sign in to comment.