Skip to content

Commit

Permalink
fixTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingjian Wu committed Jun 2, 2024
1 parent ab3057f commit 3730b9a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ public class MySqlParentChildRelMetaDataService implements ParentChildRelMetadat
static final String SQL_RENAME_CHILD_ENTITY = "UPDATE parent_child_relation "
+ "SET child = ? WHERE child = ?";

static final String SQL_DROP_ENTITY = "DELETE FROM parent_child_relation "
+ "WHERE child = ? "
+ "AND (SELECT COUNT(*) FROM parent_child_relation WHERE parent = ?) = 0";
static final String SQL_DROP_ENTITY =
"DELETE FROM parent_child_relation "
+ "WHERE child = ? "
+ "AND NOT EXISTS (SELECT 1 FROM parent_child_relation pcr2 WHERE pcr2.parent = ? AND pcr2.child <> ?)";

static final String SQL_GET_PARENTS = "SELECT parent, relation_type FROM parent_child_relation WHERE child = ?";

Expand Down

0 comments on commit 3730b9a

Please sign in to comment.